jenkins-bot has submitted this change and it was merged.

Change subject: A hack for the editor on Android 2.x
......................................................................


A hack for the editor on Android 2.x

Makes the cursor and scrolling behavior more predictable.

Change-Id: I66e59dc64508b48907c41d194fc0a97223b488cf
---
M javascripts/common/mf-application.js
M less/modules/editor.less
M stylesheets/modules/editor.css
3 files changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/javascripts/common/mf-application.js 
b/javascripts/common/mf-application.js
index a294633..9833ce2 100644
--- a/javascripts/common/mf-application.js
+++ b/javascripts/common/mf-application.js
@@ -155,6 +155,12 @@
                                        lockViewport();
                                }, false );
                        }
+
+                       // FIXME: Android 2.x can act weird
+                       // (remove if we drop support for some features on it)
+                       if ( /Android 2/.test( navigator.userAgent ) ) {
+                               $body.addClass( 'android2' );
+                       }
                }
                fixBrowserBugs();
 
diff --git a/less/modules/editor.less b/less/modules/editor.less
index 647c5c8..6d7bd6e 100644
--- a/less/modules/editor.less
+++ b/less/modules/editor.less
@@ -98,3 +98,10 @@
                position: static;
        }
 }
+
+// FIXME: high line-height (1.5) causes weird behavior in textareas on
+// Android 2.x, remove this if we don't want to support editor there
+.android2 .editor-overlay textarea {
+       line-height: 1.2;
+}
+
diff --git a/stylesheets/modules/editor.css b/stylesheets/modules/editor.css
index 8c50c9c..ef620be 100644
--- a/stylesheets/modules/editor.css
+++ b/stylesheets/modules/editor.css
@@ -97,3 +97,6 @@
     position: static;
   }
 }
+.android2 .editor-overlay textarea {
+  line-height: 1.2;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66e59dc64508b48907c41d194fc0a97223b488cf
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to