Block Selection + edit mode? Shouldn't they be exclusive

When the user is currently editing a cell, and does a block selection, i think it makes sense if it takes them out of edit mode.

Also, if a user has a block selection, and goes into edit mode, I think the block selection should stop.

How can they be made exclusive? I don’t see why both modes should be allowed at the same time.

I tried to fix the issue by putting editStop within the onBlockSelection event handler, but that doesn’t work (it keeps the grid in edit mode). If I put an alert in or delay the call to editStop, it actually gets me out of edit mode.

More info on this:

When in edit mode, then doing a block selection, it fires the onCellEdit event in stage 2. Is that right? When I return true, it still doesn’t leave edit mode.

Adding the next statement , must change behavior in the necessary way.

grid.attachEvent("onBlockSelected",function(){ grid.editStop(); return true; })

it fires the onCellEdit event in stage 2
This is expected

put an alert in or delay the call to editStop, it actually gets me out of edit mode.
Double-check that you are not using any other custom event handlers, which can switch grid back to the edit mode.

Stanislav, I don’t think there are any other handlers using it.

I noticed that when I do a block selection, it also fires stage 1 edit events. Is that normal?

I have single-click cell edits turned on (enableEditEvents(true,false,false)), but I wouldn’t think that holding and releasing the mouse should fire the same event as a single click on an editable cell.

I could understand the stage 2, because it is leaving the edit mode, but not stage 1 (it apparently thinks I want to edit a cell)

A little more information:

When I use enableEditEvents(true,false,false) (which is single click mode), and I do a block selection, it calls onEditCell in stage 1

When I use enableEditEvents(false, true, false) (which is double click mode), and I do a block selection, it does not call onEditCell in stage 1

So double click mode + block selection works fine. But not single click.

An issue I found with double click is when you have a cell editor open, and you do a block selection (which will cause the cell editor to close). If you hit tab, it re-opens the cell editor but the block selection does not disappear like it would if you actually clicked on a cell.

I noticed that when I do a block selection, it also fires stage 1 edit events. Is that normal?
Nope, it doesn’t expected. This stage is occurs when edit process started, so it must not occur during block selection.

should fire the same event as a single click on an editable cell.
It depends on browser’s behavior. Component handles js onClick event, and can’t detect which real mouse actions was source of js event.

If you hit tab, it re-opens the cell editor but the block selection does not disappear like it would if you actually clicked on a cell.

As fast workaround - handler for onEditCell, stage 0, can be added which will call code to hide block selection.