Robmoen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/71844


Change subject: Listen to keypress in ve.ce.surface.$ rather than window.
......................................................................

Listen to keypress in ve.ce.surface.$ rather than window.

Bug: 50538
Change-Id: Ifddf1bae1ee799ec3467a81c597702fc3f8be089
---
M modules/ve/ui/ve.ui.Toolbar.js
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/44/71844/1

diff --git a/modules/ve/ui/ve.ui.Toolbar.js b/modules/ve/ui/ve.ui.Toolbar.js
index 52042ac..ae9476a 100644
--- a/modules/ve/ui/ve.ui.Toolbar.js
+++ b/modules/ve/ui/ve.ui.Toolbar.js
@@ -37,9 +37,10 @@
        this.$window = null;
        this.windowEvents = {
                'resize': ve.bind( this.onWindowResize, this ),
-               'scroll': ve.bind( this.onWindowScroll, this ),
-               'keypress': ve.bind( this.onWindowKeypress, this )
+               'scroll': ve.bind( this.onWindowScroll, this )
        };
+
+       this.surface.view.$.on( 'keypress', ve.bind( this.onWindowKeypress, 
this ) );
 
        // Events
        this.$
@@ -134,6 +135,7 @@
 
        // If toolbar is floating and cursor is obscured, scroll cursor into 
view
        if ( obscured && this.floating ) {
+               ve.log( 'scrolling body' );
                $( 'html,body' ).animate( { scrollTop: scrollTo }, 0 );
        }
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifddf1bae1ee799ec3467a81c597702fc3f8be089
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>

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

Reply via email to