Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#29485 closed defect (bug) (fixed)

PageUp can cause jumpiness in editor scrolling

Reported by: nacin's profile nacin Owned by: nacin's profile nacin
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Editor Keywords: has-patch commit dev-reviewed
Focuses: Cc:

Description

Initially reported by matt, and the two of us were the only people who could reproduce. (See IRC discussion to be linked.) Video: https://cloudup.com/igMKu-5ANFd.

Turns out our mceKeyup listener doesn't bail on pageup/pagedown. It should bail on special keys along the lines of [29535], though the only ones that should actually cause a problem are pageup/pagedown/home/end. Two different patches attached depending on the level of coverage we need.

Attachments (3)

29485.diff (656 bytes) - added by nacin 10 years ago.
29485.2.diff (515 bytes) - added by nacin 10 years ago.
Pretty sure this is all that is needed.
29485.3.diff (831 bytes) - added by nacin 10 years ago.

Download all attachments as: .zip

Change History (10)

@nacin
10 years ago

This ticket was mentioned in IRC in #wordpress-dev by nacin. View the logs.


10 years ago

@nacin
10 years ago

Pretty sure this is all that is needed.

#2 @iseulde
10 years ago

What about fn + arrow keys? fn is not detectable...

#3 @iseulde
10 years ago

Nevermind, key codes change...

#4 @iseulde
10 years ago

For me fn + up = 38, fn + down = 40.

@nacin
10 years ago

#5 @nacin
10 years ago

  • Keywords commit added

Okay, now I understand how this is reproduced. Scroll down a post, click somewhere, then scroll up far enough until the cursor is out of the screen. Then start hitting special keys that *shouldn't* cause it to scroll back to the cursor.

This isn't just pagedown/pageup. It's also all modifier keys, including Windows/Mac (cmd) keys, function keys, etc... Basically, everything in [29535], just not being DRY about it.

29485.3.diff

#6 @helen
10 years ago

  • Keywords dev-reviewed added

#7 @nacin
10 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 29692:

Editor scrolling: Avoid jumping to the cursor when modifier and scrolling keys are pressed.

fixes #29485.

Note: See TracTickets for help on using tickets.