[wp-trac] [WordPress Trac] #37243: TinyMCE always gets focus on load

WordPress Trac noreply at wordpress.org
Thu Jun 30 14:20:44 UTC 2016


#37243: TinyMCE always gets focus on load
--------------------------+-------------------------
 Reporter:  afercia       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.6
Component:  Editor        |    Version:  trunk
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:  javascript    |
--------------------------+-------------------------
 I can reproduce this only on webkit browsers (Chrome and Safari on OS X
 and Chrome on Windows), no idea why Firefox is not affected. Haven't
 tested IE.

 Looks like on any page where TinyMCE is used (Edit Post, Page, CPTs, etc.)
 TinyMCE gets the focus when initialised and the cursor is placed inside
 the editor area. On Chrome, when a post has a very long content, this
 causes also the page to scroll.

 Reverting [37906] fixes it for me. As far as I see, this line
 https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/js/tinymce/plugins/wplink/plugin.js?rev=37906#L573
 always runs the `wp_link_cancel` command when TinyMCE initialises. Really
 not a TinyMCE expert here :) but quickly looking at the TinyMCE source I
 see that `execCommand()` always tries to focus the editor except for a few
 cases.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37243>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list