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

WordPress Trac noreply at wordpress.org
Thu Dec 18 23:51:08 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:  Awaiting Review
Component:  Editor       |     Version:  4.0
 Severity:  normal       |  Resolution:
 Keywords:  close        |     Focuses:  javascript
-------------------------+------------------------------
Changes (by avryl):

 * keywords:   => close
 * focuses:   => javascript


Comment:

 I think it is impossible/hard to estimate the respective position well
 enough in the other mode. Maybe one way to do it is to insert something at
 the top, switch and detect it in the other mode, but probably not worth
 adding so much code for this. Another thing we can do is to save the
 scroll position when switching the mode and apply it again when switching
 back. That would mimic the pre-4.0 behaviour. But then in most cases
 you'll still make some changes in one mode so that the content in the
 other changes so that by the time you switch back, the content is neither
 at the scroll position you left it nor at the same position as the mode
 you just came from. The only benefit would be that you might have to
 scroll a bit less for really long texts.

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


More information about the wp-trac mailing list