[wp-trac] [WordPress Trac] #28322: wpview: focus problem in Chrome making impossible to edit a visual shortcode
WordPress Trac
noreply at wordpress.org
Wed May 11 01:30:42 UTC 2016
#28322: wpview: focus problem in Chrome making impossible to edit a visual
shortcode
--------------------------+-----------------------------------------
Reporter: bduclos | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: TinyMCE | Version: 3.9
Severity: normal | Resolution:
Keywords: | Focuses: javascript, administration
--------------------------+-----------------------------------------
Changes (by isabisa):
* focuses: javascript => javascript, administration
Comment:
I just noticed this same problem and after some troubleshooting, found
this ticket. This only happens in Chrome —I'm currently running version
50.0.2661.94 (64-bit) — and commenting out line 102
`editor.getBody().focus();` solves the problem for me too.
The select() function is called on `mousedown mouseup click touchend`
events. It seems like in Chrome (if you haven't previously clicked to
place the text cursor inside the editor) on `mousedown`, the window jumps
to the top of the page and then `if ( viewNode !== selected )` evaluates
to true, triggering the problem function on line 102.
I've had trouble isolating what is making the window scroll to top on
`mousedown` though.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28322#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list