-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
TRY: Text Block: Sometimes the cursor gets moved behind the first character #2517
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2517 +/- ##
==========================================
- Coverage 31.42% 31.42% -0.01%
==========================================
Files 177 177
Lines 5409 5410 +1
Branches 946 946
==========================================
Hits 1700 1700
- Misses 3136 3137 +1
Partials 573 573
Continue to review full report at Codecov.
|
Not an easy issue indeed. I think the fix here, breaks the formatting toolbar. Sometimes clicking formatting buttons changes the position of the caret. |
@tg-ephox could you iterate based on feedback for this as would love to get this into 1.1. |
@youknowriad @karmatosed have made some progress on this. Removed all of Gutenberg/React from |
@youknowriad @karmatosed this could be a TinyMCE/Safari bug... I do however have a fix but its outside the realm of Gutenberg! If the Issue can be replicated with this page. Click on the content to focus the editor, then click the button and type again.
|
Does this mean the issue can be replicated in the current WP editor? |
@youknowriad this doesn't appear to happen in current WP editor (typing then clicking the Preview button) but im not sure that the Preview button handler calls |
Hey @youknowriad were you able to remove tabIndex from "wpbody-content" (see highlighted part above)? Thx |
@annaephox no, we're not |
@youknowriad : this issue is fixed in TinyMCE 4.7 |
@tg-ephox : reminder to test this again when Gutenberg updates to TinyMCE 4.7 |
@annaephox Great news, I tested on #2787 and it works like a charm, no bug any more. 🎉 Thanks for the fix |
fixes #1607
Have investigated this issue a lot and was un-able to replicate in plain JS or React outside of Gutenberg. Safari behaves differently than FireFox and Chrome in that it leaves the cursor in the block when the link or button is clicked, and when typing is started again in the block after focus has moved, the selection point is lost maybe?
This fix is a little heavy handed but makes the behaviour the same as FireFox and Chrome, in that when a link/button is clicked, the cursor does not remain in the block.