WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#37072 closed defect (bug) (fixed)

Unexpected behavior when using backspace/replacing content in the text editor

Reported by: DrewAPicture Owned by: azaozz
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.6
Component: Editor Keywords: needs-patch
Focuses: javascript Cc:
PR Number:

Description

I'm seeing some strange behavior when using backspace or replacing content in the text editor.

It's kind of hard to explain. The gist is that I'd expect to be able to just edit text without the scroll position jumping around in the textarea.

Right now, if I'm editing a line midway down the page, when I hit backspace, the line force jumps up to where the current line I’m editing is at the bottom of the textarea. This happens every time I hit backspace - edit a line halfway down, hit backspace or replace some content and it jumps to the bottom, I scroll back up, lather, rinse, repeat.

As you can imagine, the constant jumping around can be pretty annoying if you're editing a lot of content!

Here's a screencast demonstrating the problem: https://cloudup.com/cfgNJUSTp40

Reproduced in Chrome and Firefox in current trunk.

Change History (5)

This ticket was mentioned in Slack in #core-editor by drew. View the logs.


3 years ago

#2 @DrewAPicture
3 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hmm. After further testing, I think this might be localized to DevHub. Will reopen if I can reproduce elsewhere.

#3 @DrewAPicture
3 years ago

  • Keywords needs-patch added
  • Milestone set to Awaiting Review
  • Resolution invalid deleted
  • Status changed from closed to reopened

Nope, nevermind, reproduced on local trunk in Firefox.

#4 @azaozz
3 years ago

  • Milestone changed from Awaiting Review to 4.6

#5 @azaozz
3 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from reopened to closed

In 37684:

Editor: prevent jumping when using the backspace button in the Text editor in Firefox and IE.

Fixes #37072.

Note: See TracTickets for help on using tickets.