Context menu handles command in 'mouseup' event. Usually the 'click' event follows immediately after 'mouseup'. swallowDoubleClick worked well in that case (it set initial click count to 0 while handling the 'mouseup' event and then increased it to 1 or above while handling the immediatelly following click). However the 'undo delete' menu item handler prevents firing the 'click' event (I found that commenting out 'updateCanExecute' restores it). It's why next click with click count = 1 was ignored.

This code works whether click event follows after mouseup event or not.

BUG=172580
TEST=Check the scenario described in the bug. Check doubleclick on a context menu (bug 140364).


Review URL: https://chromiumcodereview.appspot.com/12614002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186770 0039d316-1c4b-4281-b951-d872f2087c98
1 file changed