-
-
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
[Safari] Triple-click in a nested editable selects the whole widget #1463
Comments
I'm adding it to the next iteration because this is very annoying. Actually, it was frustrating for me when I tried to edit the content. |
cc @jodator |
The https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-MouseEvent We could observe the whole editable area and prevent the event if |
Unfortunately, preventing the event or/and stopping propagation didn't work. Seems like the selection is being modified before firing the |
Can't we simply handle this event and set selection ourselves? We know the event target, right? So we know where the user was clicking so we can select the right content. Am I right? |
The selection should be put inside the |
I changed it but it still blinks. The worst thing is that is blinks randomly. |
No code, no comments. |
I did a quick research and this is what I found:
I created a solution draft which is as simple as view.addObserver( MouseObserver );
view.document.on( 'mousedown', ( evt, data ) => {
console.log( 'mousedown', data.domEvent.detail );
if ( data.domEvent.detail >= 3 && data.target.is( 'figcaption' ) ) {
data.domEvent.preventDefault();
view.change( writer => {
writer.setSelection( data.target, 'in' );
} );
}
} ); and it seems to be working. All we need now is:
|
This issue must be fixed at the widget–level (not image–level) so I'm afraid ckeditor/ckeditor5-image#280 will not do. |
Feature: Added `isSafari` property and `isSafari()` helper to the `env` module. See: ckeditor/ckeditor5#1463.
Fix: Triple clicking inside a nested editable should not select the entire widget in Safari. Closes ckeditor/ckeditor5#1463.
…#1463 should alter the model to work properly. Closes ckeditor/ckeditor5#1677.
Internal: The triple-click fix for Safari introduced in ckeditor/ckeditor5#1463 should alter the model to work properly. Closes ckeditor/ckeditor5#1677.
Is this a bug report or feature request? (choose one)
🐞 Bug report
💻 Version of CKEditor
Master
📋 Steps to reproduce
✅ Expected result
❎ Actual result
📃 Other details that might be useful
Which is even/also very uncool – this leads to excessive scroll jump.
The text was updated successfully, but these errors were encountered: