Esanders has uploaded a new change for review.

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

Change subject: DOMNodeInsertedIntoDocument -> DOMNodeInserted
......................................................................

DOMNodeInsertedIntoDocument -> DOMNodeInserted

Firefox doesn't support the former. The latter will fire a couple more
times but that's better than never.

Change-Id: Iddd408a0dd88244c2648e9405b9930df3bea63c4
---
M src/layouts/MenuLayout.js
M src/widgets/TextInputWidget.js
2 files changed, 2 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/25/188325/1

diff --git a/src/layouts/MenuLayout.js b/src/layouts/MenuLayout.js
index 8d98726..999e703 100644
--- a/src/layouts/MenuLayout.js
+++ b/src/layouts/MenuLayout.js
@@ -42,7 +42,7 @@
        this.$content = this.$( '<div>' );
 
        // Events
-       this.$element.on( 'DOMNodeInsertedIntoDocument', 
this.onElementAttach.bind( this ) );
+       this.$element.on( 'DOMNodeInserted', this.updateSizes.bind( this ) );
 
        // Initialization
        this.toggleMenu( this.showMenu );
@@ -87,16 +87,6 @@
 };
 
 /* Methods */
-
-/**
- * Handle DOM attachment events
- */
-OO.ui.MenuLayout.prototype.onElementAttach = function () {
-       // getPositionProperty won't know about directionality until the layout 
is attached
-       if ( this.showMenu ) {
-               this.$content.css( this.getPositionProperty(), this.menuSize );
-       }
-};
 
 /**
  * Toggle menu.
diff --git a/src/widgets/TextInputWidget.js b/src/widgets/TextInputWidget.js
index 39fe0d7..3fe98a6 100644
--- a/src/widgets/TextInputWidget.js
+++ b/src/widgets/TextInputWidget.js
@@ -62,7 +62,7 @@
                keypress: this.onKeyPress.bind( this ),
                blur: this.setValidityFlag.bind( this )
        } );
-       this.$element.on( 'DOMNodeInsertedIntoDocument', 
this.onElementAttach.bind( this ) );
+       this.$element.on( 'DOMNodeInserted', this.onElementAttach.bind( this ) 
);
        this.$icon.on( 'mousedown', this.onIconMouseDown.bind( this ) );
        this.$indicator.on( 'mousedown', this.onIndicatorMouseDown.bind( this ) 
);
        this.on( 'labelChange', this.updatePosition.bind( this ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iddd408a0dd88244c2648e9405b9930df3bea63c4
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>

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

Reply via email to