[wp-trac] [WordPress Trac] #29492: Attemp to keep both Text and Visual editors scroll position when switching

WordPress Trac noreply at wordpress.org
Fri Dec 19 23:55:41 UTC 2014


#29492: Attemp to keep both Text and Visual editors scroll position when switching
-------------------------+-------------------------
 Reporter:  azaozz       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  4.2
Component:  Editor       |     Version:  4.0
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  javascript
-------------------------+-------------------------

Comment (by azaozz):

 Was testing with adding a <span id="wp-caret-position"> before switching
 and removing it right after. Works but has quite a few edge cases which
 make the code pretty complex (and the more complex it is the more edge
 cases pop up).

 > Well, here's another way to do it, and pretty simple.

 It is even simpler, see 29492.2.patch. No need for
 editor.beforeShow/beforeHide, etc.

 Not sure if we want to do that though, 50/50 at the moment. Using the
 scroll ratio comes with a limitation: if there are images or wpViews in
 the post and the user has scrolled past them, the ratio is totally
 unusable. Can be more confusing than not scrolling at all. Also, the
 longer the post, the larger the scroll position error/shift.

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


More information about the wp-trac mailing list