From 3925d1cb14b7f6125480612e46c9e08cbdf64c95 Mon Sep 17 00:00:00 2001 From: accraze Date: Tue, 22 Dec 2015 16:55:08 -0800 Subject: [PATCH 1/2] fixed tabIndex to handle empty string chrome acts buggy and jumps when tabindex is not set to empty string. fixes #769 --- src/viewer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/viewer.js b/src/viewer.js index 6dfa5c7c..165938c5 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -234,7 +234,7 @@ $.Viewer = function( options ) { style.left = "0px"; }(this.canvas.style)); $.setElementTouchActionNone( this.canvas ); - this.canvas.tabIndex = options.tabIndex || 0; + this.canvas.tabIndex = options.tabIndex || 0 || "" ; //the container is created through applying the ControlDock constructor above this.container.className = "openseadragon-container"; From a3f0216ad7ace858a02f29bffb48a519b381686e Mon Sep 17 00:00:00 2001 From: accraze Date: Wed, 6 Jan 2016 20:00:38 -0800 Subject: [PATCH 2/2] Added tabIndex to default to zero empty string is also accepted as well. --- src/viewer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/viewer.js b/src/viewer.js index 165938c5..723a4b65 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -234,7 +234,7 @@ $.Viewer = function( options ) { style.left = "0px"; }(this.canvas.style)); $.setElementTouchActionNone( this.canvas ); - this.canvas.tabIndex = options.tabIndex || 0 || "" ; + this.canvas.tabIndex = (options.tabIndex === undefined ? 0 : options.tabIndex); //the container is created through applying the ControlDock constructor above this.container.className = "openseadragon-container";