jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/360647 )

Change subject: Fix errors leading to wrong slider scroll postions
......................................................................


Fix errors leading to wrong slider scroll postions

The detection touched in this patch addresses slightly different
kinds of RTL handling in browsers. The detection how things are
handled seems to be broken in the mentioned Chrome V8 versions.

The workaround takes care of that issue. With Chrome V8 6.0 this
should be fixed and the workaround can be removed.

P.S.: Credits to Leszek for the idea what's actually going on.

Bug: T168299
Change-Id: I068c2fb6ba60189004c0ec6661fcd346af16126c
---
M modules/ext.RevisionSlider.SliderView.js
1 file changed, 10 insertions(+), 1 deletion(-)

Approvals:
  Tobias Gritschacher: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ext.RevisionSlider.SliderView.js 
b/modules/ext.RevisionSlider.SliderView.js
index 979e7e2..5b46a72 100644
--- a/modules/ext.RevisionSlider.SliderView.js
+++ b/modules/ext.RevisionSlider.SliderView.js
@@ -621,7 +621,16 @@
                 * @return {string} - 'default', 'negative' or 'reverse'
                 */
                determineRtlScrollType: function () {
-                       var $dummy = $( '<div>' )
+                       var isChrome = /chrom(e|ium)/.test( 
navigator.userAgent.toLowerCase() ),
+                               $dummy;
+
+                       // in Chrome V8 5.8.283 and 5.9.211 the detection below 
gives wrong results leading to strange behavior
+                       // Chrome V8 6.0 seems to fix that issue so this 
workaround can be removed then
+                       if ( isChrome ) {
+                               return 'default';
+                       }
+
+                       $dummy = $( '<div>' )
                                .css( {
                                        dir: 'rtl',
                                        width: '1px',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I068c2fb6ba60189004c0ec6661fcd346af16126c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionSlider
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Andrew-WMDE <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: WMDE-leszek <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to