Bug 29977 - [GTK] shift+pageup/pagedown confuses textarea about which end of selection is anchored
Summary: [GTK] shift+pageup/pagedown confuses textarea about which end of selection is...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 21955
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-01 13:23 PDT by Dan Winship
Modified: 2010-10-13 07:54 PDT (History)
5 users (show)

See Also:


Attachments
Patch (65.18 KB, patch)
2010-02-17 18:05 PST, Ojan Vafai
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Winship 2009-10-01 13:23:57 PDT
When selecting text with the keyboard using Shift plus a motion key, normally the behavior is that one end of the selection is anchored where you started, and the cursor moves just like it would if you weren't holding Shift down, and the other end of the selection is wherever the cursor is.

However, typing Shift+PageUp or Shift+PageDown momentarily confuses WebKit so that both ends of the selection become unanchored, and if the next key is an "up" key (Up, PageUp, Home, Control+Home), then the selection will always be extended upward, and if the next key is a "down" key (Down, PageDown, End, Control+End), then the selection will be always extended downward.

That is, if typing Shift+PageDown selects 10 lines downward, then you'd expect 10 Shift+Downs followed by a Shift+Up to do the same thing as 1 Shift+PageDown followed by Shift+Up. But it doesn't; the former selects 9 lines starting from the line where the cursor started, whereas the latter selects 11 lines, starting from the line above where the cursor started.

(I initially thought this might be related to bug 28154, but Safari works as I would expect WebKitGTK to.)
Comment 1 Jens Petersen 2009-10-15 00:04:15 PDT
With 532.2 the behaviour seems worse: ie the original
end of the selection is unarchored not the end made by
PageUp/PageDown.
Comment 2 Eric Seidel (no email) 2009-11-12 13:07:50 PST
This seems related to bug 21955.
Comment 3 Ojan Vafai 2010-02-17 17:06:49 PST
This is the correct behavior on OS X. It's incorrect on other platforms. Removing the [GTK] marker since this applies to all non-Mac ports.
Comment 4 Ojan Vafai 2010-02-17 18:05:50 PST
Created attachment 48954 [details]
Patch
Comment 5 Ojan Vafai 2010-02-17 18:13:48 PST
Nevermind. I misread this. This is a different bug. Doesn't happen on Windows. Sorry for the confusion.
Comment 6 Martin Robinson 2010-10-12 17:20:34 PDT
Dan, do you still see this? I do not. A while ago we made some fairly major changes to the way that key events are handled in form fields. Perhaps that fixed the problem?
Comment 7 Dan Winship 2010-10-13 05:21:20 PDT
Yes, sorry, this has been fixed for a long time. I could have sworn the bug had been closed...
Comment 8 Martin Robinson 2010-10-13 07:54:56 PDT
No problem! Thanks for the update.