mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
Removed Viewer focusHandler/onCanvasFocus
Presumably, this was meant to manually scroll the viewer into view when it receives focus. This is already handled by browsers when tabbing to the viewer, so doing it explicitly isn't necessary, and it creates a negative user experience when clicking on a viewer to give it focus (as of #569).
This commit is contained in:
parent
e966f3eafb
commit
1e8b3a1ea6
@ -301,7 +301,6 @@ $.Viewer = function( options ) {
|
||||
clickDistThreshold: this.clickDistThreshold,
|
||||
dblClickTimeThreshold: this.dblClickTimeThreshold,
|
||||
dblClickDistThreshold: this.dblClickDistThreshold,
|
||||
focusHandler: $.delegate( this, onCanvasFocus ),
|
||||
keyDownHandler: $.delegate( this, onCanvasKeyDown ),
|
||||
keyHandler: $.delegate( this, onCanvasKeyPress ),
|
||||
clickHandler: $.delegate( this, onCanvasClick ),
|
||||
@ -2188,13 +2187,6 @@ function onBlur(){
|
||||
|
||||
}
|
||||
|
||||
function onCanvasFocus( event ) {
|
||||
if ( !event.preventDefaultAction ) {
|
||||
var point = $.getElementPosition( this.element );
|
||||
window.scrollTo( 0, point.y );
|
||||
}
|
||||
}
|
||||
|
||||
function onCanvasKeyDown( event ) {
|
||||
if ( !event.preventDefaultAction && !event.ctrl && !event.alt && !event.meta ) {
|
||||
switch( event.keyCode ){
|
||||
|
Loading…
Reference in New Issue
Block a user