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

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

Projects

None yet

1 participant

@ebengtso
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
ebengtso commented Mar 1, 2013

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

@ebengtso
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
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 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