[wp-trac] [WordPress Trac] #52305: WordPress Classic Editor Shifting Textarea View Position To Top

WordPress Trac noreply at wordpress.org
Fri Jan 15 11:10:01 UTC 2021


#52305: WordPress Classic Editor Shifting Textarea View Position To Top
--------------------------+-----------------------------
 Reporter:  Darko A7      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:
 Severity:  normal        |   Keywords:
  Focuses:  javascript    |
--------------------------+-----------------------------
 Steps to reproduce: (on Windows 10 x64, Chrome latest browser version)

 1) Install latest and greatest WordPress*

 - with "2021" theme as active (theme is irrelevant, actually)
 - absolutely no plugins should be active EXCEPT WordPress Classic Editor:
 **wordpress.org/plugins/classic-editor/**

 * NOTE: exact/latest WP version is not actually relevant, either, because
 this bug is an ongoing issue for at least a 6-12 months now - can't say
 for sure - it's just that I finally found the time to investigate it on a
 clean fresh system.

 - Activate plugin, switch to **Classic Editor** mode for new posts, and
 switch from **Visual** to **Text** input mode (this is very important!).

 2) Create new post in Text mode

 - Simply copy-paste provided demo html text (demo lorem ipsum text with
 sufficient length should be used, to provide enough "page scroll" or
 reduce browser's window width to approx 1200 pixels to emulate older
 laptop computer) + add some h3 tags (for easier orientation, as long as
 you do not scroll all the way down to the end of the text, but position
 mouse cursor to the end of a paragraph somewhere in the middle you should
 be able to reproduce this bug.

 - save the post
 - now edit the post (it is best to activate DevTools and disable browser
 caching just to be sure everything is freshly loaded every time)

 - when you **position mouse cursor somewhere in the middle** of the
 article **at the end of a paragraph or html element** and hit **ENTER**
 key on the keyboard (to create new paragraph line), Editor will jump its
 position and text will completely shift outside visible area to the top!

 This is a bug that exists for about a year or so and it is very annoying
 (to say at least), particularly to us who are used to work directly with
 html tags in Text mode.

 Bug seems to originate in TinyMCE editor's scroll function that is
 triggered when we hit Enter key (according to debugger). It uses math
 function to calculate position of the top toolbar with commands. (?)

 See provided video recording to visualize the bug itself. Sometimes it may
 not occur, but try to repeat it again, and it should reproduce.

 I would likely to know if there's an easy fix for this. Thanks!

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


More information about the wp-trac mailing list