Repository navigation
Mantine: node props render a button inside a button - #41
Conversation
Canvas add control is no longer a nested <button>; open it via data-testid and pointerdown like the component tests.
ashalugin
left a comment
There was a problem hiding this comment.
I reproduced these three issues in Chrome and confirmed they still occur at e22b2a3c.
- Shift-click multi-select breaks on the canvas and in the component tree. Select one component, then Shift-click a second. The second component is selected on
pointerdownand deselected onclickbecause both handlers toggle selection. Both components stay selected onmaster. Selection handlers - The new Mantine slots can create nested native buttons in Preview and FormViewer. Use the left section picker to add an
MtButtonto anotherMtButton, then open Preview. The viewer renders a<button>inside another<button>, and React reports invalid nesting. Mantine button rendering - The Add component control no longer responds to click-only activation. Calling
.click()on the empty canvas’s add control opens the picker onmasterand has no effect on the PR. Mouse press, Enter, and Space still work. Add control handlers
At 904c0d0f, npm run check-all, 50 focused component tests, and 16 E2E tests passed across React 18 and 19. Real mouse checks also passed for opening both Mantine slot pickers, dropping a palette item into a slot, and selecting a nested checkbox. CI run
|
This one should not be fixed, as it is entirely the user’s responsibility.
|
Co-authored-by: Alexey Cherepanov <a@cherepanov.info>
Co-authored-by: Alexey Cherepanov <a@cherepanov.info>
Co-authored-by: Alexey Cherepanov <a@cherepanov.info>
…props-render-a-button-inside-a-button
|
I reproduced a floating toolbar regression on
Expected. The action runs for Actual. Selection switches to The toolbar's The existing Remove E2E test dispatches a synthetic Reproduction form{
"version": "1",
"tooltipType": "MtTooltip",
"modalType": "MtDialog",
"form": {
"key": "Screen",
"type": "Screen",
"props": {},
"children": [
{
"key": "mtButton1",
"type": "MtButton",
"props": {}
}
]
},
"languages": [
{
"code": "en",
"dialect": "US",
"name": "English",
"description": "American English",
"bidi": "ltr"
}
],
"defaultLanguage": "en-US"
} |
Co-authored-by: Alexey Cherepanov <a@cherepanov.info>
Summary
<button>control and open it onpointerdownso it works inside HTML5 drag hosts (e.g.MtButtonsections).leftSection/rightSectionasnodeonMtButton.pointerdownso HTML5 drag does not cancel the click.Packages affected
@react-form-builder/designer@react-form-builder/components-mantineChecklist
npm run check-alllocally (or explain why not) — not run for this draft PR open; focused component coverage is intests/component/tests/node-picker-in-button.spec.tsxtests/when appropriatedocumentation/docsfor user-facing changesBreaking changes / migration
None.