[wp-trac] [WordPress Trac] #28595: wpviews: "catch" the cursor and create a fake cursor so that the "cursor" can be set on either side of the view

WordPress Trac noreply at wordpress.org
Thu Jun 19 21:49:33 UTC 2014


#28595: wpviews: "catch" the cursor and create a fake cursor so that the "cursor"
can be set on either side of the view
--------------------------+-----------------------------
 Reporter:  avryl         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  TinyMCE       |    Version:  3.9
 Severity:  normal        |   Keywords:
  Focuses:  javascript    |
--------------------------+-----------------------------
 Also fixes #28594, #28593 and #28257.

 Patch coming. Atm this works perfectly well in Safari and Chrome. It needs
 some adjustments for Firefox. Haven't tested IE yet, brrr.

 So this patch adds a body and two <p> tags before and after it. The body
 now is contenteditable="false", the parent wrap is not. Now the view can
 "catch" the cursor. We can detect it and create a fake cursor on the
 relevant side of the view. Keyboard input can be manipulated for those
 positions.

 The fake cursor is as high as the view and you can't see the difference
 between the real and the fake one with the naked eye. :)

 Moving around in the editor with arrow keys feels a lot more natural now.

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


More information about the wp-trac mailing list