[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Toolbars: Replace $.width with clientWidth/offsetWidth

2018-01-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405934 )

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


Toolbars: Replace $.width with clientWidth/offsetWidth

Bug: T185599
Change-Id: Id32e38f85eb11f4574ef72ce45df06dde43251b4
---
M src/ui/ve.ui.PositionedTargetToolbar.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/ui/ve.ui.PositionedTargetToolbar.js 
b/src/ui/ve.ui.PositionedTargetToolbar.js
index 5cc557c..e429d43 100644
--- a/src/ui/ve.ui.PositionedTargetToolbar.js
+++ b/src/ui/ve.ui.PositionedTargetToolbar.js
@@ -104,7 +104,7 @@
  */
 ve.ui.PositionedTargetToolbar.prototype.calculateOffset = function () {
this.elementOffset = this.$element.offset();
-   this.elementOffset.right = this.$window.width() - 
this.$element.outerWidth() - this.elementOffset.left;
+   this.elementOffset.right = document.documentElement.clientWidth - 
this.$element[ 0 ].offsetWidth - this.elementOffset.left;
 };
 
 /**
@@ -133,7 +133,7 @@
  */
 ve.ui.PositionedTargetToolbar.prototype.float = function () {
if ( !this.floating ) {
-   this.height = this.$element.height();
+   this.height = this.$element[ 0 ].offsetHeight;
// When switching into floating mode, set the height of the 
wrapper and
// move the bar to the same offset as the in-flow element
this.$element

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id32e38f85eb11f4574ef72ce45df06dde43251b4
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Toolbars: Replace $.width with clientWidth/offsetWidth

2018-01-23 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405934 )

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

Toolbars: Replace $.width with clientWidth/offsetWidth

Bug: T185599
Change-Id: Id32e38f85eb11f4574ef72ce45df06dde43251b4
---
M src/ui/ve.ui.PositionedTargetToolbar.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/34/405934/1

diff --git a/src/ui/ve.ui.PositionedTargetToolbar.js 
b/src/ui/ve.ui.PositionedTargetToolbar.js
index 5cc557c..e429d43 100644
--- a/src/ui/ve.ui.PositionedTargetToolbar.js
+++ b/src/ui/ve.ui.PositionedTargetToolbar.js
@@ -104,7 +104,7 @@
  */
 ve.ui.PositionedTargetToolbar.prototype.calculateOffset = function () {
this.elementOffset = this.$element.offset();
-   this.elementOffset.right = this.$window.width() - 
this.$element.outerWidth() - this.elementOffset.left;
+   this.elementOffset.right = document.documentElement.clientWidth - 
this.$element[ 0 ].offsetWidth - this.elementOffset.left;
 };
 
 /**
@@ -133,7 +133,7 @@
  */
 ve.ui.PositionedTargetToolbar.prototype.float = function () {
if ( !this.floating ) {
-   this.height = this.$element.height();
+   this.height = this.$element[ 0 ].offsetHeight;
// When switching into floating mode, set the height of the 
wrapper and
// move the bar to the same offset as the in-flow element
this.$element

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id32e38f85eb11f4574ef72ce45df06dde43251b4
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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