Bug 62833 - Arrow keys don't move caret properly in vertical writing modes
Summary: Arrow keys don't move caret properly in vertical writing modes
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on: 62743
Blocks: 49408
  Show dependency treegraph
 
Reported: 2011-06-16 16:34 PDT by Ryosuke Niwa
Modified: 2011-09-26 12:36 PDT (History)
7 users (show)

See Also:


Attachments
work in progress (7.53 KB, patch)
2011-06-17 14:54 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
fixes the bug (13.88 KB, patch)
2011-06-17 15:42 PDT, Ryosuke Niwa
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2011-06-16 16:34:01 PDT
In vertical writing modes, left and right arrow keys move carets up and down, and up and down arrow keys move carets left and right.
Comment 1 Ryosuke Niwa 2011-06-17 14:54:23 PDT
Created attachment 97656 [details]
work in progress
Comment 2 Ryosuke Niwa 2011-06-17 15:42:23 PDT
Created attachment 97661 [details]
fixes the bug
Comment 3 Ryosuke Niwa 2011-06-17 15:49:51 PDT
I have to admit this is not the prettiest patch I've submitted but don't know a cleaner way of implementing this feature.
Comment 4 Ryosuke Niwa 2011-06-20 16:28:53 PDT
Ping reviewers
Comment 5 Darin Adler 2011-06-20 16:34:51 PDT
Comment on attachment 97661 [details]
fixes the bug

This seems awkward. The flag name is precise, but mechanical. Seems like readers will understand the other arguments to modify and be puzzled by this one. The concept of “swapping” is not quite the right way to describe the fact that turning things 90 degrees might change what the direction means.

Despite all of that I have no specific better suggestion, so r=me
Comment 6 Ryosuke Niwa 2011-06-20 17:12:55 PDT
(In reply to comment #5)
> (From update of attachment 97661 [details])
> This seems awkward. The flag name is precise, but mechanical. Seems like readers will understand the other arguments to modify and be puzzled by this one. The concept of “swapping” is not quite the right way to describe the fact that turning things 90 degrees might change what the direction means.

I know.  I spent some time thinking about this (tired TreatLineAndCharacterLogically vs. TreatLineAndCharacterPhysically, LineAndCharacterAreLogical vs. LineAndCharacterArePhysical, RespectWritingMode vs. DoNotRespectWritingMode) but couldn't come up with a better name.
Comment 7 Ryosuke Niwa 2011-06-20 18:12:34 PDT
It seems like ap thinks it's better to keep 'left', 'character' move the caret visually to the left if I understand him correctly.  I'll wait few more days before landing this patch to see if there are any other objections on the whatwg thread titled "getSelection().modify() in vertical writing modes".
Comment 8 Darin Adler 2011-06-20 19:25:26 PDT
I think he’s right. We don’t need a concrete term like “left” to mean “backwards”, when we already have an abstract term for backwards.
Comment 9 Ryosuke Niwa 2011-09-26 12:24:20 PDT
This patch has been sitting on the commit queue for a while. I'd like to land this patch unless someone objects. It's really bad to leave the caret movement broken.
Comment 10 Alexey Proskuryakov 2011-09-26 12:35:03 PDT
I still think that we shouldn't repurpose "left" to mean something other than left.
Comment 11 Ryosuke Niwa 2011-09-26 12:36:06 PDT
(In reply to comment #10)
> I still think that we shouldn't repurpose "left" to mean something other than left.

But 'left' already means up when combined with 'line'. I don't think this patch introduces any confusion than there already is.