Skip to content
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

dgrid-row:contextmenu grid.row(evt) not returning correct row on firefox #450

Closed
ebengtso opened this issue Mar 1, 2013 · 3 comments
Closed

Comments

@ebengtso
Copy link

ebengtso commented Mar 1, 2013

The code below returns the correct row on Chrome, but not on Firefox. It works only when number of elements are lower than window height

this.grid.on(".dgrid-row:contextmenu", function(evt){
evt.preventDefault(); // prevent default browser context menu
var row = self.grid.row(evt);
});

@ebengtso
Copy link
Author

ebengtso commented Mar 1, 2013

I have another dgrid that reproduces the same problem on both Chrome and Firefox

@ebengtso
Copy link
Author

ebengtso commented Mar 1, 2013

I know why this happens. My dojo/store/Memory has objects without the attribute "id", and I did not overwrite the idProperty it, thus the error. If I configure the idProperty to match a field of my object, the problem is solved.

Is this a bug? if it's not a bug it could at least raise a warning.

@ghost
Copy link

ghost commented Mar 1, 2013

Admittedly, lack of correctly specified idProperty is a pretty common tripping point for people. It's hard to warn against since to an extent it requires mind-reading, and if there were a warning, it seems like it'd be more apt to be on the store end. You could try filing an enhancement request about this at http://bugs.dojotoolkit.org/ (since that's where dojo/store is implemented), but ultimately it'd be up to the committers.

We do have plans to have a dgrid tutorial related to using stores, and this is definitely something we will want to mention in it. With that in mind, given there's not really any other action that can be taken on dgrid's end, I'm closing this.

@ghost ghost closed this as completed Mar 1, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant