diff --git a/ui/jquery.ui.interaction.js b/ui/jquery.ui.interaction.js index 35b1e7704..a88dfe341 100644 --- a/ui/jquery.ui.interaction.js +++ b/ui/jquery.ui.interaction.js @@ -160,8 +160,6 @@ var touchHook = interaction.hooks.touch = { } }; -// TODO: test mouse -// TODO: how can we detect a "right click" with a pen? var pointerHook = interaction.hooks.msPointer = { setup: function( widget, start ) { widget._bind({ @@ -172,6 +170,14 @@ var pointerHook = interaction.hooks.msPointer = { return; } + // TODO: how can we detect a "right click" with a pen? + // TODO: get full details about which and button from MS + // touch and pen = 1 + // primary mouse button = 2 + if ( event.which > 2 ) { + return; + } + // track which pointer is performing the interaction pointerHook.id = event.pointerId; // prevent panning/zooming