-
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
Problem with Selection and Pagination in IE9 #379
Comments
This is the same issue I was trying to track down earlier this week... it appears to be a race condition at first glance... but I was not able to track down an overall cause. |
Same issue here. Still havent found the cause. Anyone? |
This error is actually happening when Keyboard is thrown into the mix. We are still working on finding the best way to fix this. |
Sorry. We actually dont have Keyboard in the mix and still get the exact same issue. Any known work around for this that you might know? Thanks in advance |
Interesting that you say you are experiencing the issue even without Keyboard. Can you tell us what mixins you are using (or perhaps even share a small gist)? That might provide us a new angle to poke at this from. |
Hi Ken. Here you go. I hope this helps and you can keep us update on the issue. It happens only in IE9 and as it was mentioned before after refreshing the page sometimes the select works (as in dgrid-deselect - dgrid-select) other times after refreshing goes like (dgrid-select - dgrid-deselect) as I was able to notice logging to the console. Cheers. require([module,'dojo/dom-style', 'dijit/registry', 'dojo/_base/declare', 'scapi/dialogs', 'dgrid/OnDemandGrid', 'dgrid/Selection', 'dgrid/extensions/Pagination', 'dojo/store/Memory', 'dijit/TitlePane', 'dojo/_base/array', 'dijit/ProgressBar', 'dijit/Tooltip', 'dojo/parser'], function(orgDao, domStyle, registry, declare, dialogs, OnDemandGrid, Selection, Pagination, Memory, TitlePane, array) { ... orgDao.dashboard(organization, function(tableRowValues) { ... var someListGrid = declare([OnDemandGrid, Selection, Pagination, PageFlipNotification, declare([], { onPageDisplay: function(results) { ... } })]); someStore = new dojo.store.Memory({idProperty: 'someId', data: tableRowValues}); grid = new someListGrid({ query: function(tableRowValue) { ... }, store: someStore, columns: { ... }, selectionMode: 'single' }, 'someName'); // end of grid creation grid.on('dgrid-select', function(event) { someReferrals.selectEncounter(event.rows[0].data); console.log('Selection happening...'); }); grid.on('dgrid-deselect', function(event) { someReferrals.selectEncounter(null); console.log('De-selection happening...'); }); }); }); |
One thing I would immediately point out here is that you've got a declare call inside another declare call, though I imagine that's probably harmless, just sub-optimal. i.e. why not do this instead: var someListGrid = declare([OnDemandGrid, Selection, Pagination, PageFlipNotification], {
onPageDisplay: function(results) {
...
}
}); You reference a |
Thanks for the comment Ken. I have implemented your suggestion on the declare. Good catch! As for the mixins the PageFlipNotification does not throw any events. I started removing mixins and their functionality would go away but the problem stay. ie: when removing pagination it would show one big list of items. when removing Selection i would no be able to select items. when PageFlipNotification it would not update a cell status after loading content. OnDemandGrid i was not able to removed as it is obviously needed. |
I missed that in your original code sample - you shouldn't be mixing Pagination into OnDemandGrid; mix it into Grid directly. Not sure whether that will solve the problem in your case. Basically I was wondering if the issue would happen to you with just Grid + Pagination + Selection, since in our experience it didn't seem to happen then. |
We need to use OnDemandGrid since we have a store. I still tried with Grid and had the same issue. I have a work around using this: grid.on(".dgrid-row:click", function(event){ if (internetExplorerVersion() == 9) { doTheJob(grid.row(event).data); } }); I truly hope this can be resolved soon. |
So, this was a really weird issue that ended up being fixed by a wild guess. The thing that was setting IE9+ off was clicking the This necessitated some other changes in Pagination in order to preserve existing functionality (i.e. tab stops, and ability to activate navigation controls by pressing enter when they have keyboard focus), but it should all be working now. If you see anything odd as a result of the latest changes, please open a ticket. Thanks! |
Also, @luisjotapepe, I just realized you mentioned you were using OnDemandGrid to be able to use a store. The thing is, Pagination also builds in that logic - you do not need to (and should not) include OnDemandGrid in your declare hierarchy when using Pagination. Both OnDemandList and Pagination extend _StoreMixin, which is what provides the base store logic. |
When I use a dgrid with Selection and Pagination, the dgrid-select and dgrid-deselect events do not work anymore after I select a different page.
With the code below I get the following:
Select a row:
LOG: select: dgrid-select - important
Select another row:
LOG: select: dgrid-deselect - important
LOG: select: dgrid-select - note
Select page 2 and select a row:
LOG: select: dgrid-cellfocusout - no rows
LOG: select: dgrid-cellfocusin - no rows
Using dojo 1.8.1 and dgrid 0.3.5-dev.
Happens only in IE9, works ok in Chrome and IE8 (= IE9 with IE8 compatibility mode)
Also does no happen anymore after I refresh the page in IE9.
Any ideas?
Code to reproduce. Put in dgrid\test\extensions
The text was updated successfully, but these errors were encountered: