-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
model.selection range issue with chromium 132 #17821
Comments
Possible root cause of the issue : https://developer.chrome.com/release-notes/132?hl=en#fix_selection_iscollapsed_in_shadow_dom |
Are you using the editor in the Shadow DOM? |
I cannot reproduce on the latest demo, first range is returned: |
We are maintaining a solution that was built upon the CKeditor 34.2.0. This custom Plugin creates a 'Link' button under the selected text and when it is clicked we try to get the range from the editor:
In the bound function the range is always pointing to the start of any selection but doesn't hold the full range. For example: I select a text from 10 to 20, but the editor.model.document.selection.getFirstRange() returns {start:10, end: 10}. |
This version of the editor is 2y old, I'm sorry, but we are not accepting bugs and fix requests against old versions. During that time there were multiple API improvements and browser compatibility improvements. Please provide the reproduction steps for the latest editor version. |
Right now we are using the version 41.4.0 and the issue is there. |
This is still an outdated version, please provide the repro steps for the latest |
📝 Provide detailed reproduction steps (if any)
✔️ Expected result
const { selection } = model.document;
Calling selection.getFirstRange or checking the _ranges should contain the selected range.
❌ Actual result
const { selection } = model.document;
Calling selection.getFirstRange or checking the _ranges, the range is empty (start == end).
❓ Possible solution
📃 Other details
The text was updated successfully, but these errors were encountered: