SitePen / dgrid

A lightweight, mobile-ready, data-driven, modular grid widget designed for use with dstore
http://dgrid.io/
Other
628 stars 295 forks source link

Space and enter keys dont work correctly on dgrid sort #1417

Closed rushil-patel closed 6 years ago

rushil-patel commented 6 years ago

Similar to #731 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: grid.on("dgrid-sort", function (evt) {.....}

I've traced "dgrid-sort" emission back to : https://github.com/SitePen/dgrid/blob/master/Grid.js#L279

I'm not sure why both "click" and "keydown" events get fired on pressing enter or space keys. But the the sort Listener catches and emits "dgrid-sort" twice for enter and space key presses.

rushil-patel commented 6 years ago

Closed, resolved by updating to the latest version. Can't repro anymore.