Opened 14 years ago
Closed 13 years ago
#5858 closed defect (fixed)
_base/test_FocusManager.html "restore focus" button failing (Safari)
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Dijit | Version: | 1.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
_base/test_FocusManager.html "restoreFocus" button seems to have no effect on FF2/win, FF3/mac, or safari. See http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/_base/test_FocusManager.html
Actually, this was also broken in 1.0 branch (see http://download.dojotoolkit.org/release-1.0.2/dojo-release-1.0.2/dijit/tests/_base/test_FocusManager.html):
FF2/win, IE6: same problem FF3/mac: error that dijit.getEnclosingWidget not found?!
Attachments (2)
Change History (10)
Changed 14 years ago by
Attachment: | window.js.diff added |
---|
Changed 14 years ago by
Attachment: | focus.js.diff added |
---|
[cla] [patch] ([email protected]…) omitted "this"
comment:1 Changed 14 years ago by
Works in FF2/Linux and IE6/wine. Not sure if there is a problem with "apply(context, cbArguments | | [ ])" in other browsers when context is undefined.
Nicola
comment:2 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 14 years ago by
Owner: | set to bill |
---|
comment:4 Changed 14 years ago by
With focus.js.diff and window.js.diff (window.js.diff is related to /dojo/_base/window.js) works for me also in IE7, Safari 3.0.3/win and FF2/win.
Nicola
comment:5 Changed 14 years ago by
Bill,
in 1.0 branch dijit.getEnclosingWidget is defined in manager.js, but focus.js doesn't call a dojo.require("dijit._base.manager").
In dijit/_base.js "dijit._base.manager" is required after "dijit._base.focus".
hth,
Nicola
comment:6 Changed 14 years ago by
(In [12662]) Refs #5858: _base/test_FocusManager.html "restore focus" button failing. This gets the code working on IE and FF, but not Safari...
The focus API tries to be clever, and (in this example) saves not what is actually in focus (ie, the save button itself), but what was in focus immediately before the save button was pressed. That code fails on Safari since the save button never gets focus. Need to rethink or desupport this API since I suspect the current code will fail on IE/FF if it's called when nothing is in focus: it will save whatever used to be in focus, even if that was 10 minutes earlier. Will rethink for 2.0.
Patch partly from Nicola (CLA on file)
comment:7 Changed 14 years ago by
Milestone: | 1.1 → 2.0 |
---|---|
Summary: | _base/test_FocusManager.html "restore focus" button failing → _base/test_FocusManager.html "restore focus" button failing (Safari) |
comment:8 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Milestone: | 2.0 → 1.4 |
Resolution: | → fixed |
Status: | new → closed |
It's working now, I think from Jared's work on the focus.js code.
[cla] [patch] ([email protected]…) arguments must be passed even if context object is undefined