[wp-trac] [WordPress Trac] #29385: wpview: selecting all the content with ctrl/cmd + A when there are views doesn't work

WordPress Trac noreply at wordpress.org
Tue Sep 2 16:37:19 UTC 2014


#29385: wpview: selecting all the content with ctrl/cmd + A when there are views
doesn't work
--------------------------+------------------------------
 Reporter:  avryl         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  TinyMCE       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  javascript
--------------------------+------------------------------
Changes (by avryl):

 * keywords:  needs-patch => has-patch


Comment:

 The problem: event.element from the NodeChange event always gives the
 first element in the editor if everything is selected. If the first
 element is a view however, we detect that the view is not properly
 selected and set the cursor before the view. We could limit this to only
 collapsed ranges, since the chance of having a lost uncollapsed range
 inside a view is extremely rare.

 Another issue with views at the top or bottom of the editor is that
 they're not correctly removed when selecting everything and then hitting
 backspace. For me the last view was left, and the first view was broken
 and not visible. We could probably fix this by detecting a full selection
 and then correctly removing all the content on backspace or any other
 keypress that inserts some content.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29385#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list