-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Space and enter keys dont work correctly with the selector extension #731
Comments
What browser / OS are you seeing this issue in? I have just tried reproducing it in FF, Chrome, IE (9), Safari, and Opera (12) and do not see this issue. Also, if you're using a store, can you confirm your store items have unique IDs? Failing to do that tends to cause a lot of issues and this could be one of them. |
The same issue happens for me working on Chrome 30.0.1599.69 / Windows 7 and Windows XP and IE 8 / Windows XP and IE10 / Windows 7. I tried to embed selector column in a GridFromHtml using the example dgrid\test\GridFromHtml.html. I succeeded, but when focus a checkbox and hit the space bar both keydown and click events fire and that causes the checkbox state to stay same as its old value. window.selector = selector;
var _store = new Memory({"idPropery": "order", "data": testOrderedData});
window.gridFromHtmlLegacyFormatter = new (declare([GridFromHtml, OnDemandList, Selection]))({"store": _store,
"selectionMode": "none"}, "gridFromHtmlLegacyFormatter");
gridFromHtmlLegacyFormatter.startup(); <table id="gridFromHtmlLegacyFormatter">
<thead>
<tr>
<th data-dgrid-column="selector({})">Selector</th>
<th data-dgrid-column="{field:'_item', sortable:false, formatter:testFormatter}">Step</th>
</tr>
</thead>
</table> |
@APGarchev your code has a typo ("idPropery") and thus is not setting |
Given no further response, I'm closing this issue. If after amending store settings there is still an issue, we can take another look if you can provide an updated reduced test case. |
same problem for me (chrome 46, dojo 1.10.4, dgrid 0.3.16) - .dgrid-selector:click and .dgrid-keydown are fired for the selector-checkbox when hitting the [space]-key causing the row to get selected and being immediately deselected. |
Hm. Trying again, I can reproduce this if I click directly on a selector checkbox and then hit space, but not if I focus the cell itself and hit space. |
the column is configured like selector({id:'selector',unhidable:true,tabIndex:0}) I'm selecting the checkbox by tabbing into it and then hit [space] |
I'm seeing a related issue but In this case I'm not using the selector plugin-in. I'm listening for the "dgrid-sort" event which seems to be called twice when "enter" or "space is clicked. It looks like "click" and "keydown" events are fired when "enter" or "space" key is pressed. This is my listener that appears to be called twice: |
I am using dgrid/selector plugin. when I try to select/deselect columns using keyboard keys space or enter the column doesn't change the selection state.
after debugging this problem, it looks like "onSelect" function from selector.js is called twice when space or enter key is used.
following line adds the event listeners
listeners.push(grid.on(".dgrid-selector:click,.dgrid-selector:keydown", onSelect));
but when user hits the space/enter, I guess both click and keydown events are emitted and the onSelect method is called twice and column goes back to the original state.
The text was updated successfully, but these errors were encountered: