paulopmx/Flexigrid — pull request #42 by canoeberry (2012-10-17 16:51:10+00:00)
Title: improved efficiency and CMD key support for Mac users

This contains two changes in a single diff. I hope it's not too confusing. Also - this is my first pull request: I hope I have done it right.

The first is, I improved the efficiency of the addRowProp function. The problem with it, as I saw it, was it was creating new copies of the event handler for each row in the response. That's because it was calling $.each(...) on each row. But that's not necessary as that behavior is part of how jQuery works.

Second, I added support for metaKey so that Mac users can select multiple items by using CMD instead of Control, because on Macs, Control-click means RIGHT click and brings up the menu.

Along with that change I improved the behavior of clicking and meta/control clicking. There was a situation where a control-click was toggling an item and then immediately toggling it again, once in the mousedown handler and once in the click handler.