DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/369407 )

Change subject: LinearTabKeyDownHandler: Abort if modifiers are used
......................................................................

LinearTabKeyDownHandler: Abort if modifiers are used

Firefox still does the tab-switch, so we shouldn't move the selection when
that's going to happen. This is the same check that's used in the
TableArrowKeyDownHander.

Bug: T172168
Change-Id: I05ff2a52813bf299bdd9121e42718941fc5f35dd
---
M src/ce/keydownhandlers/ve.ce.LinearTabKeyDownHandler.js
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/07/369407/1

diff --git a/src/ce/keydownhandlers/ve.ce.LinearTabKeyDownHandler.js 
b/src/ce/keydownhandlers/ve.ce.LinearTabKeyDownHandler.js
index c68816d..a60cbf8 100644
--- a/src/ce/keydownhandlers/ve.ce.LinearTabKeyDownHandler.js
+++ b/src/ce/keydownhandlers/ve.ce.LinearTabKeyDownHandler.js
@@ -39,6 +39,13 @@
 ve.ce.LinearTabKeyDownHandler.static.execute = function ( surface, e ) {
        var activeTableNode = surface.getActiveNode() && 
surface.getActiveNode().findParent( ve.ce.TableNode );
        if ( activeTableNode ) {
+               if ( e.ctrlKey || e.altKey || e.metaKey ) {
+                       // Support: Firefox
+                       // In Firefox, ctrl-tab to switch browser-tabs still 
triggers the
+                       // keydown event.
+                       return;
+               }
+
                e.preventDefault();
                e.stopPropagation();
                activeTableNode.setEditing( false );

-- 
To view, visit https://gerrit.wikimedia.org/r/369407
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05ff2a52813bf299bdd9121e42718941fc5f35dd
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to