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

Change subject: Toolbars: Replace $.width with clientWidth/offsetWidth
......................................................................

Toolbars: Replace $.width with clientWidth/offsetWidth

Bug: T185599
Change-Id: I8f36244f1d605424594c1a61b5d107b3075213fa
---
M src/Toolbar.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/31/405931/1

diff --git a/src/Toolbar.js b/src/Toolbar.js
index 7720b5d..559bc2a 100644
--- a/src/Toolbar.js
+++ b/src/Toolbar.js
@@ -388,7 +388,7 @@
 OO.ui.Toolbar.prototype.onWindowResize = function () {
        this.$element.toggleClass(
                'oo-ui-toolbar-narrow',
-               this.$bar.width() <= this.getNarrowThreshold()
+               this.$bar[ 0 ].clientWidth <= this.getNarrowThreshold()
        );
 };
 
@@ -401,7 +401,7 @@
  */
 OO.ui.Toolbar.prototype.getNarrowThreshold = function () {
        if ( this.narrowThreshold === null ) {
-               this.narrowThreshold = this.$group.width() + 
this.$actions.width();
+               this.narrowThreshold = this.$group[ 0 ].offsetWidth + 
this.$actions[ 0 ].offsetWidth;
        }
        return this.narrowThreshold;
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f36244f1d605424594c1a61b5d107b3075213fa
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders <esand...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to