Make WordPress Core

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#29561 closed defect (bug) (worksforme)

In Firefox, scroll bar jumps to beginning/end of editor upon page up/down when focused

Reported by: ambushcommander's profile AmbushCommander Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: Editor Keywords: needs-testing
Focuses: ui Cc:

Description

Steps to reproduce:

  1. Navigate to admin page and open a post in the editor which spans multiple pages
  2. Click in the textarea, so that the cursor appears
  3. Press "Page Down"

Expected result: I scroll a page down in the text

Actual result: The cursor jumps to the bottom of the text (becoming invisible in the process)

Environment: Default profile of Firefox of up-to-date Ubuntu Trusty Tahr, Firefox 31.0 with the default Ubuntu extensions.

Change History (7)

#1 @AmbushCommander
10 years ago

More testing on a fresh Wordpress install reveals that this behavior only occurs if you are using the text editor (not the visual editor). On the visual editor, there is a different bug: if I select in the visual editor, and then press page down, it does scroll down, but the cursor position does not change. The behavior is indifferent to whether or not you are in two-pane or one-pane mode.

Actually, playing around with the screen options, I have a hypothesis for what is happening: in order to implement infinite scroll, Wordpress currently configures the text editor box with a ludicrously large height. It appears to be the case that some browsers (Firefox included) interpret page-down as "move the amount of space indicated by the height of the textarea". Since the textarea is so big, that essentially means, "move to the bottom of the post"!

This ticket was mentioned in Slack in #core by clorith. View the logs.


10 years ago

This ticket was mentioned in Slack in #feature-focus by clorith. View the logs.


10 years ago

#4 @iseulde
10 years ago

Hi! Thanks for the report. I'm trying to reproduce this on a mac, but FN+UP/DOWN doesn't do anything in Firefox. It works in the visual editor though. It works fine in Chrome.

Do you have to use a key combination or is there a separate key for this on your computer?

On the visual editor, there is a different bug: if I select in the visual editor, and then press page down, it does scroll down, but the cursor position does not change.

I don't think the cursor position should change. Think about this as scrolling; the cursor position doesn't change. So this sounds like the expected behaviour.

#5 @AmbushCommander
10 years ago

I don't own a Mac, so I can't really do the test there. I'm just using the standard PgUp/PgDn keys that come on Windows/Linux keyboards. Maybe you can reproduce if you plug in a standard USB keyboard? I did verify that the bug DOES NOT occur on Chrome on Ubuntu Linux.

I don't think the cursor position should change. Think about this as scrolling; the cursor position doesn't change. So this sounds like the expected behaviour.

The metric I'm applying is consistency with native UI elements. I don't know if the behavior is different on a Mac (but I don't think it is), but when I press PgUp/PgDown in a text box on Firefox and Chrome, the cursor moves. Same applies for basically any text editor you might possibly use (e.g. Emacs, Vim, Gedit...) So if the visual editor is just "one giant glorified text box", then the same behavior should apply. If it doesn't, you should have a good reason...

#6 @chriscct7
9 years ago

  • Keywords needs-testing added
  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

This doesn't occur on Chrome Windows either.

So far, this ticket has verified that the bug does not occur on Windows Chrome or FireFox and Linux Chrome or FireFox.

So far over the last 2 years, no one has been able to replicate this.

Going to close this as worksforme. Feel free to reopen if someone can reproduce this.

This ticket was mentioned in Slack in #meta by netweb. View the logs.


9 years ago

Note: See TracTickets for help on using tickets.