-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MultiRootEditor will trigger an additional onChange event when using @radix-ui/react-dropdown-menu #432
Comments
Could you describe in details what's the problem is and the expected outcomes. It's hard to understand and judge from the screenshots. Thanks! |
ok. The problem is this: The steps to reproduce are as follows:
and everything goes well.
import MultiRootEditorRichDemo from "./editor";
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
import {HamburgerMenuIcon} from "@radix-ui/react-icons";
function App() {
const multiRootEditorContent = {
intro: '<h2>Sample</h2><p>This is an instance of the ' +
'<a href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#classic-editor">multi-root editor build</a>.</p>',
content: '<p>It is the custom content</p><figure class="image"></figure>',
outro: '<p>You can use this sample to validate whether your ' +
'<a href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/development/custom-builds.html">custom build</a> works fine.</p>'
};
const rootsAttributes = {
intro: {
row: '1',
order: 10
},
content: {
row: '1',
order: 20
},
outro: {
row: '2',
order: 10
}
};
return (
<>
<DropdownMenu.Root>
<DropdownMenu.Trigger asChild>
<button className="IconButton" aria-label="Customise options">
<HamburgerMenuIcon />
</button>
</DropdownMenu.Trigger>
<DropdownMenu.Portal>
<DropdownMenu.Content className="DropdownMenuContent" sideOffset={5}>
<DropdownMenu.Item className="DropdownMenuItem">
New Tab <div className="RightSlot">⌘+T</div>
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Portal>
</DropdownMenu.Root>
<MultiRootEditorRichDemo data={multiRootEditorContent} rootsAttributes={rootsAttributes}/>
</>
)
}
export default App refresh the page, at this time
|
@DawidKossowski could you take a look? |
@oonxt, I used the code snippet you provided, but unfortunately, I cannot reproduce this issue: Maybe you could use an online playground to create a reproducible example and share the link. |
with @radix-ui/dropdown-menu:
All editable elements are disappeared
without:
here is the code
The text was updated successfully, but these errors were encountered: