Opened 10 years ago

Closed 10 years ago

#10052 closed defect (fixed)

IE: focus manager getFocus() not working with InlineEditBox

Reported by: Douglas Hays Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.2
Keywords: Cc: bill
Blocked By: Blocking:

Description

There seems to be a regression in Dojo 1.4 caused by [19678].
Run test_InlineEditBox.html using IE.
Click to edit the first very blank textbox near the top.
TAB and wait a couple of seconds.
Focus was correctly on the 2nd box, but then just disappears.
InlineEditBox? is calling dijit.focus(dijit.getFocus()) after 1 second and apparently getFocus is returning something that is not the 2nd textbox.

Attachments (1)

focus.patch (1.1 KB) - added by Jared Jurkiewicz 10 years ago.
Possible fix. Don't restore bookmarks if target focus point has is collapsed area. (in dijit.focus). Doesn't seem to break any UT, or dijit.Editor.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 10 years ago by Jared Jurkiewicz

getFocus is returning the focus is on node: dijit_InlineEditBox_0, which is that targetted node, which is that second textbox.

Therefore, the problem isn't in getFocus, it's in focus, the restore.

comment:2 Changed 10 years ago by Jared Jurkiewicz

And specifically, it's the bookmark. The moveToBookmark code is shifting to wherever that is, and it's causing focus to drop.

Changed 10 years ago by Jared Jurkiewicz

Attachment: focus.patch added

Possible fix. Don't restore bookmarks if target focus point has is collapsed area. (in dijit.focus). Doesn't seem to break any UT, or dijit.Editor.

comment:3 Changed 10 years ago by Jared Jurkiewicz

Bill, your thoughts on it? Know of anything that might break?

comment:4 Changed 10 years ago by Douglas Hays

patch seems to work for InlineEditBox?, with and without the #10016 patch.

comment:5 Changed 10 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [20475]) Ignore restoring 'selections' (Eg bookmarks), if they were collapsed. Restoring them on IE tends to cause focus loss. fixes #10052

Note: See TracTickets for help on using tickets.