Mailing List Archive

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Toolbars: Replace $.width with clientWidth/offsetWidth
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 <esanders@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Toolbars: Replace $.width with clientWidth/offsetWidth [ In reply to ]
jenkins-bot has submitted this change and it was merged. ( 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(-)

Approvals:
Bartosz Dziewo?ski: Looks good to me, approved
jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I8f36244f1d605424594c1a61b5d107b3075213fa
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders <esanders@wikimedia.org>
Gerrit-Reviewer: Bartosz Dziewo?ski <matma.rex@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

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