Skip to content
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

Dropdown Options Not Scrolling in Jodit Editor When Used Inside React Modal/Dialog #1171

Open
subin989 opened this issue Aug 22, 2024 · 4 comments
Labels

Comments

@subin989
Copy link

Issue

Jodit Version: 4.xxxxx

Browser:

OS:

Is React App: True

Reproduced on xdsoft.net: False

Description:

When using Jodit editor inside a React modal or dialog component, the editor's dropdown options are not scrolling properly. This issue prevents users from accessing all dropdown options when there are more options than can fit within the visible area of the modal.

Expected Behavior:

The dropdown options in the Jodit editor should be scrollable within the modal or dialog component.

Actual Behavior:

The dropdown options are not scrollable, making it impossible to access all options when there are too many to fit in the visible area.

@xdan xdan added the bug label Oct 16, 2024
@Arkanii
Copy link

Arkanii commented Oct 18, 2024

Same issue here

@Arkanii
Copy link

Arkanii commented Oct 18, 2024

After investigation it seems that the structure of the body when Jodit is used in the modal is:

  • <div id="main">
  • <div class="modal"> : there is the Jodit instance inside
  • <div class="jodit-box"> : it needs it many times: dropdowns, popover, etc

The modal has priority over all, and clicking on a jodit-box is considered as clicking outside the modal and closing it
And the modal I use (shadcn with radix) adds on the body the css pointer-events: none; and this causes the bug because it prevents clicking above the modal

One solution is to put all the <div class="jodit-box"> not at the bottom of the body element but elsewhere, in the jodit-react-container (or root ?) element for example to have the dropdown in the modal.

@JohannaYaggo
Copy link

JohannaYaggo commented Oct 18, 2024

I have the same issue too ! It's not just about the scrolling but we can't click on an element inside the dropdown neither.

@Arkanii
Copy link

Arkanii commented Nov 4, 2024

Hello @xdan, a fix is planned for that bug ? Thanks a lot ! 🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants