#9447 closed defect (fixed)
test_FocusManager save bookmark broken in Safari
Reported by: | haysmark | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Dijit | Version: | 1.3.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
http://archive.dojotoolkit.org/nightly/checkout/dijit/tests/_base/test_FocusManager.html
If you select a textbox, then click save selection, the console says that the node and bookmark are null.
Change History (4)
comment:1 Changed 12 years ago by
Milestone: | tbd → 1.4 |
---|---|
Status: | new → assigned |
Summary: | test_FocusManager save bookmark broken in Safari 4 → test_FocusManager save bookmark broken in Safari |
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 12 years ago by
Note that since this occurs on Safari 3 also, I don't think the fix needs to be backported to the 1.3 branch. We could though, it seems pretty safe.
comment:4 Changed 11 years ago by
Note: See
TracTickets for help on using
tickets.
The bookmark returned in that test file is broken on all browsers... I think it only works when getFocus() is called programatically, not when the user needs to press a button.
The issue is that merely pressing the "Save focus/selection state" button removes focus from the previously-focused <input>/<textarea>, and thus de-selects whatever text was selected.
As for the node being null, that is a bug, although it also occurs on Safari 3.2.1 according to my tests. It's because pressing the button on safari removes focus altogether, which is different than IE, where pressing a button makes the button itself gets focus.
I think I can compensate for safari's different behavior by returning the previously focused node if current focus is null... similar to how getFocus() returns the previously focused node if the current focus is the button. However, I want to be sure that I don't return a previously-previously focused node, in the case where: