You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Component bind click event to window and check target inside callback. This doesn't work with Shadow DOM (e.target is Shadow DOM host every time). We have to use "path" instead of target.
I made CodeSandbox example.
Here I patch Select plugin "onOutsideClick" method with "getEventTarget" helper.
If you try to select image - poppup will work (but not the case with table, see next)
So instead of patching we should just use "getEventTarget" everywhere.
Because of that condition popup is shown and closed at the same time - "document.elementFromPoint" method can't search inside Shadow DOM.
I made another CodeSandbox example where "document.elementFromPoint" patched with helper method with deep search.
So instead of patching we should just use "elementFromPoint" everywhere.
The text was updated successfully, but these errors were encountered:
Jodit Version: 3.18.9
Browser: Chrome/FF
OS: Windows
Is React App: True
Code
CodeSandbox
Expected behavior:
If you try to select image or table, popup with additional menu should be shown.
Actual behavior:
Popup is not shown:
jodit/src/plugins/select/select.ts
Line 85 in 5278d95
Component bind click event to window and check target inside callback. This doesn't work with Shadow DOM (e.target is Shadow DOM host every time). We have to use "path" instead of target.
I made CodeSandbox example.
Here I patch Select plugin "onOutsideClick" method with "getEventTarget" helper.
If you try to select image - poppup will work (but not the case with table, see next)
So instead of patching we should just use "getEventTarget" everywhere.
jodit/src/plugins/table/select-cells.ts
Line 163 in 5278d95
Because of that condition popup is shown and closed at the same time - "document.elementFromPoint" method can't search inside Shadow DOM.
I made another CodeSandbox example where "document.elementFromPoint" patched with helper method with deep search.
So instead of patching we should just use "elementFromPoint" everywhere.
The text was updated successfully, but these errors were encountered: