Opened 7 years ago
Closed 7 years ago
#18573 closed defect (invalid)
_KeyNavContainer endless loop when focused item becomes disabled and the user presses a key.
Reported by: | MarkFalconbridge | Owned by: | MarkFalconbridge |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Dijit | Version: | 1.10.4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
- Create a dijit.toolbar with some buttons in it.
- Make the onClick action of the button disable itself.
- Click the button.
- Press a key on the keyboard.
At this point the code in _KeyNavContainer enters an endless loop looking for something that matches the key pressed but never gets out of the loop because the currently focused item is no longer focusable.
Attachments (1)
Change History (8)
comment:1 Changed 7 years ago by
Component: | General → Dijit |
---|---|
Owner: | set to MarkFalconbridge |
Status: | new → pending |
comment:2 Changed 7 years ago by
Status: | pending → new |
---|
<div id="widget"></div> require( [ "dojo/_base/declare", "dijit/layout/LayoutContainer", "dijit/Toolbar", "dijit/form/Button", "dojo/_base/array" ], function (declare, Container, Toolbar, Button, array) { var MyWidget = declare(Container, { postCreate: function () { this.inherited(arguments); var me = this; this.toolbar = new Toolbar({region: "top"}); array.forEach(["1", "2", "3"], function (label) { var button = new Button({ label: label, showLabel: true, onClick: function () {button.set('disabled', true)} },label); me.toolbar.addChild(button); }); this.addChild(this.toolbar); }, startup: function() { this.inherited(arguments); this.resize(); } }); var widget = new MyWidget({}, "widget"); });
comment:3 Changed 7 years ago by
Here's a jsfiddle. https://jsfiddle.net/kshdyqqy/ Run it, click one of the buttons and then press a few keys on the keyboard. You'll enter the endless loop.
comment:5 Changed 7 years ago by
Owner: | changed from MarkFalconbridge to bill |
---|---|
Status: | new → assigned |
comment:6 Changed 7 years ago by
Owner: | changed from bill to MarkFalconbridge |
---|---|
Status: | assigned → pending |
It sounds like the problem you are describing was fixed by cef0a828574cc9f9f80f8bce0a46b7f293630232 but actually, I can't reproduce the error using your jsfiddle, even against 1.10.4 rather than master.
Your description to "press a few keys" is rather vague, but I'm guessing you are talking about typing "1", "2", or "3" rather than pressing the left and right arrow keys. In any case, both of those things are working for me in 1.10.4.
If you have more specific instructions to reproduce the problem, let me know. Also, let me know if it was fixed by cef0a828574cc9f9f80f8bce0a46b7f293630232.
comment:7 Changed 7 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
OK. Can you attach a test case instead of just describing one?