NEW 16928
REGRESSION: {shift+}tabbing into a form element does not restore caret position
https://bugs.webkit.org/show_bug.cgi?id=16928
Summary REGRESSION: {shift+}tabbing into a form element does not restore caret position
Eric Seidel (no email)
Reported 2008-01-18 15:35:04 PST
tab folllowed by shift-tab does not work as expected (at least on windows) 1. Place your cursor in an editable text region (<textarea>, <iframe> document.designMode= "ON", <div contenteditable>) 2. type some text "foo bar" 3. place your cursor between foo and bar 4. hit tab, followed by shift-tab. Notice how you cursor is in the wrong place: <textarea> : colapsed to start <iframe> : same <div contenteditable> : entire contents selected FireFox and IE both get this right in all cases (your cursor is where you left it).
Attachments
test case with programmatic focus/blur that also breaks (715 bytes, text/html)
2008-06-26 14:13 PDT, Ojan Vafai
no flags
mitz
Comment 1 2008-01-18 19:15:53 PST
FocusController::advanceFocus() passes false to the element's focus() method. In fact, all callers pass false, which is somewhat strange.
mitz
Comment 2 2008-01-18 19:52:40 PST
(In reply to comment #1) > all callers pass false, which is somewhat strange. I failed to notice that true is the default value and some callers call focus(). Looking at <http://trac.webkit.org/projects/webkit/changeset/20072> it seems like the tabbing case is covered by the test from that patch, but some of the currently checked-in results say FAIL. Running the test manually I do not get the expected results in the tab test. I suspect that a regression occurred some time after r20072.
Ojan Vafai
Comment 3 2008-01-28 18:08:35 PST
Just to clarify, Firefox and Opera get this right. IE puts your cursor at the end of the region you tab back into.
Eric Seidel (no email)
Comment 4 2008-01-28 18:48:53 PST
Per mitz's comments, marking this a Regression. Regressions are p1.
Adam Roben (:aroben)
Comment 5 2008-02-04 07:35:29 PST
Justin Garcia
Comment 6 2008-06-16 12:54:04 PDT
hello world
Ojan Vafai
Comment 7 2008-06-26 14:13:04 PDT
Created attachment 21961 [details] test case with programmatic focus/blur that also breaks
Ojan Vafai
Comment 8 2008-06-26 14:16:01 PDT
To be clear this is a more generic problem with blurring and focusing editable nodes. I attached a test case that shows a contentEditable element with the first letter selected. Then after a second it focuses another element and then focuses back on that element. In IE/FF the first letter ("f") is still selected. In WebKit, the entire contents of the contentEditable element is selected. FWIW, I just ran into a bug this causes with the find feature of my intranet's wiki software.
Note You need to log in before you can comment on or make changes to this bug.