RESOLVED FIXED 70757
Moving to the start of line should not place the caret outside of the table
https://bugs.webkit.org/show_bug.cgi?id=70757
Summary Moving to the start of line should not place the caret outside of the table
Ryosuke Niwa
Reported 2011-10-24 13:49:00 PDT
When moving to the start of a line (command + left arrow key on Mac; Home on Windows) inside the first table cell, the caret is placed before of the table but this behavior is inconsistent with Firefox, TextEdit, Microsoft Word, which all place the caret in the first position inside the table cell.
Attachments
test (1.57 KB, text/html)
2011-10-24 14:30 PDT, Ryosuke Niwa
no flags
fixes the bug (5.38 KB, patch)
2011-10-25 11:40 PDT, Ryosuke Niwa
no flags
Ojan Vafai
Comment 1 2011-10-24 14:16:30 PDT
Do you have a testcase we can play with?
Ryosuke Niwa
Comment 2 2011-10-24 14:30:15 PDT
Julie Parent
Comment 3 2011-10-24 15:00:22 PDT
Does this imply that there is no keyboard navigable way to get out of the table? What about the reciprocal behavior of moving to the end of the line?
Ryosuke Niwa
Comment 4 2011-10-24 15:04:34 PDT
(In reply to comment #3) > Does this imply that there is no keyboard navigable way to get out of the table? What about the reciprocal behavior of moving to the end of the line? There is. You just need to move using arrow keys without any modifiers, which is what all other browsers and apps do. Our current behavior is broken and inconsistent. There's no way for users to move to the beginning of a table cell. Also, moving to the end of a line at the end last table cell doesn't move the caret to a position after the table :( So we're inconsistent with our own behavior.
Ryosuke Niwa
Comment 5 2011-10-24 15:10:10 PDT
One clarification: neither Firefox nor Internet Explorer lets you move the caret before or after the table in the test case I attached. WebKit provides an extra position before/after the table.
Ojan Vafai
Comment 6 2011-10-24 15:22:29 PDT
(In reply to comment #5) > One clarification: neither Firefox nor Internet Explorer lets you move the caret before or after the table in the test case I attached. WebKit provides an extra position before/after the table. That's a bug IMO. Firefox/IE should be fixed.
Ryosuke Niwa
Comment 7 2011-10-25 11:40:24 PDT
Created attachment 112366 [details] fixes the bug
Chang Shu
Comment 8 2011-10-25 12:03:15 PDT
Maybe I missed the previous conversations. I found the following two commits that introduced the function and a fix to that: http://trac.webkit.org/changeset/25586 http://trac.webkit.org/changeset/63918 Would this code change break the tests in the commits above? Or shall we update their expectations?
Ryosuke Niwa
Comment 9 2011-10-25 12:19:48 PDT
(In reply to comment #8) > Maybe I missed the previous conversations. I found the following two commits that introduced the function and a fix to that: > http://trac.webkit.org/changeset/25586 > http://trac.webkit.org/changeset/63918 > > Would this code change break the tests in the commits above? Or shall we update their expectations? All tests still pass.
Chang Shu
Comment 10 2011-10-25 15:06:45 PDT
Comment on attachment 112366 [details] fixes the bug The code change matches the new behavior. r=me.
Ryosuke Niwa
Comment 11 2011-10-25 15:07:23 PDT
Thanks for the review.
WebKit Review Bot
Comment 12 2011-10-25 16:17:08 PDT
Comment on attachment 112366 [details] fixes the bug Clearing flags on attachment: 112366 Committed r98408: <http://trac.webkit.org/changeset/98408>
WebKit Review Bot
Comment 13 2011-10-25 16:17:13 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.