-
-
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] Reverse typing effect after focus change, e.g., outdent button causing text to insert backwards. #14702
Comments
I cannot reproduce it, could you share a video? Screen.Recording.2023-08-01.at.13.40.48.mov |
@Witoso I believe this may be another case of "backwards" typing. We've also seen this type of behavior in Mac where no performance issue needs to be present for it to reproduce. This may be one of the cases I called out in the bug: #14569 (comment) where I believed there could be additional cases in this platform (Mac). Internally, we've had a number of users claim similar things where performance issue has not been present (again, Mac!) but I've yet to actually reproduce it myself. From my general understanding, the CMD+TAB action back into the editable will actually begin to insert text backwards (sticky cursor) -- however, based on my testing with @niegowski 's change, I was unable to reproduce it further. I personally don't use Mac often so it may just be me not being thorough enough. Could there be another area where things like indent/outdent could affect selection not being updated? |
The demos on the page are not updated yet, so there's a chance it will help with this case. @niegowski WDYT about the indent? |
Oh, it's about the outdent 🤦 |
@niegowski Yeah this is something that I get confused about. 😖 This happens on other scenarios too, but the basic trigger is the same. The text box generally looks focused at the moment the action is taken, but it isn't? This seems to be a Mac-only thing... |
It's about any disabled button in the toolbar. If the button is disabled we probably should not focus the button on click (but still be focusable by the keyboard). But I'm not sure how it conforms to accessibility rules. cc @Comandeer? |
The focusability of disabled controls is about the discoverability of these controls and it's mainly mentioned in the context of a keyboard focus. I would argue that in the case of a mouse user, the discoverability is better achieved in other ways (e.g. hovering the disabled button). Due to that, I'd say that it's safe to disable the focus on clicking and keep enabled only the keyboard one. We've also done it in CKEditor 4 and it worked well. |
Another case #14830 of a similar behavior. I wonder @niegowski what could be our actions here:
|
I would like to suggest taking a look at #14830 because I provided a test case that allows one to reproduce the issue using a button element outside that exists outside of the editor’s realm. The disabled toolbar button is just another case of this and (at least there) you could possibly call In the issue I have explained that |
I've run into similar issues like this, and have found that at times focus is ripped away improperly on Mac due to some forced blur event. We did something similar to (3). This problem causes the DOM selection to "disappear". The editable is still in some weird focused state. How we were able to get around this temporarily was to register a Note, the issue doesn't seem to be limited to just these button clicks, it seems to be a general problem overall where unexpected focus stealing from the editable where it doesn't have a chance to (for lack of better term) clean up some state causes it to go into a reverse typing mode. (As @niegowski mentioned, this issue presented here is different from the other one that was fixed) |
Hi I see issue: #14830 was closed. Does this mean that this issue has resolved as well? If so what release will it be deployed in? |
Hi, it was closed to not duplicate discussion on multiple issues. This is the main one for this problem, and the discussion about it. |
Just to add another way to reproduce this issue, I stumbled on this one recently. While using Safari, in the CKEditor classic demo editor, if I click into the table menu and move my mouse around and then close the table menu, text starts being inserted in reverse order. safari_focus.mov |
Another scenario for the sticky cursor in Safari: Steps:
Results: Screen.Recording.2023-12-07.at.09.26.11.movNotes: macOS 14.0 |
Fix (engine): The reverse typing effect should not happen after the focus change. Closes #14702.
The work for this issue and others related is completed in the #16289, and we finalized the round of internal (successful) tests. I encourage everyone to test the PR if you have a chance. It should be merged in the following days, and will be a part of the next release. |
Fix (typing, engine): Predictive text should not get doubled while typing. Closes #16106. Fix (engine): The reverse typing effect should not happen after the focus change. Closes #14702. Thanks, @urbanspr1nter! Fix (engine, typing): Typing on Android should avoid modifying DOM while composing. Closes #13994. Closes #14707. Closes #13850. Closes #13693. Closes #14567. Closes: #11569.
Thank you! |
📝 Instructions
✔️ Expected result
Text should input normally
❌ Actual result
The text is input in reverse
📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: