#15133 closed defect (fixed)
dijit/focus: spurious curNode=null notification
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8 |
Component: | Dijit | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
See attached test case. Tabbing through the inputs causes a watch("curNode", func) callback where newValue=null (or undefined), rather than the <input>. It's followed by the correct notification that curNode was set to one of the <input>'s.
Kris' "focusin" event doesn't seem to have this problem, so should probably upgrade dijit/focus to use that.
Attachments (3)
Change History (8)
Changed 9 years ago by
Attachment: | focusin.html added |
---|
comment:1 Changed 9 years ago by
Summary: | dijit/focus: spurious curNode=null notification (IE) → dijit/focus: spurious curNode=null notification |
---|
comment:2 Changed 9 years ago by
Owner: | set to bill |
---|---|
Resolution: | → fixed |
Status: | new → closed |
In [28298]:
comment:3 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|
comment:4 Changed 9 years ago by
Hi, we have found out, that your patch affected behaviour of editable cells in dojox/grid/EnhancedGrid widget. The problem is, you are not able to edit any grid cells. This problem appears only in Google Chrome.
Snippet of code to simulate it:
<TABLE id="grid2" data-dojo-type="dojox/grid/EnhancedGrid" data-dojo-props="autoHeight:true, singleClickEdit:true, selectionMode:'single'"> <THEAD> <TR> <TH field="contintent" cellType="dojox.grid.cells._Widget" widgetClass="dijit.form.TextBox" editable="true" width="100%">Continent</TH> </TR> </THEAD> </TABLE> <script type="text/javascript"> require([ "dojo/ready", "dijit/dijit", "dojo/_base/lang", "__mocks/store", "dojox/grid/EnhancedGrid", "dijit/form/TextBox", "dojox/grid/cells/dijit" ], function(ready, dijit, lang, store) { ready(function() { dijit.byId('grid2').setStore(store); }); }); </script>
Problem is in _clearActiveWidgetsTimer function, in timout value. Patch file is attached.
Changed 9 years ago by
Attachment: | focus.patch added |
---|
comment:5 Changed 9 years ago by
Hmm. I see the problem you are talking about, but it seems like a grid issue, so I filed #15167.
The 0ms timeout is intentional. It's for when a user clicks on a non-focusable button (or image, or whatever) in order to trigger a Dialog. When the user closex the Dialog, the Dialog tries to restore focus to wherever it was previously, which means that we want to notice that the mousedown on the non-focusable button/image cleared the focus before the mouseup causes the Dialog to appear. (Actually, this is what requires 0ms timeout for the curNode, not for the widget stack, but it seems like they should both have the same timeout.)
Changed 9 years ago by
Attachment: | onFocusHint.patch added |
---|
patch for more places to hint to focus manager when a node is focused, but doesn't help the grid case
test case showing watch("curNode") bug on IE8, and also showing on(<body>, "focusin") working correctly