Jhobs has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277607

Change subject: WIP: Fix phantom overlay title on scroll for iOS9
......................................................................

WIP: Fix phantom overlay title on scroll for iOS9

This does not work yet.

Bug: T126792
Change-Id: Id42aad8cd7cb241c5f58042daf322693f1a84e5f
---
M resources/mobile.browser/browser.js
M resources/mobile.overlays/Overlay.js
M resources/mobile.overlays/Overlay.less
3 files changed, 14 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/07/277607/1

diff --git a/resources/mobile.browser/browser.js 
b/resources/mobile.browser/browser.js
index 57ebdda..4376de7 100644
--- a/resources/mobile.browser/browser.js
+++ b/resources/mobile.browser/browser.js
@@ -70,6 +70,11 @@
 
                        if ( ios && version ) {
                                switch ( version ) {
+                                       case 9:
+                                               // Test UA for iOS9. Or for 
simulator look for Version 9
+                                               // In the iOS simulator the OS 
is the host machine OS version
+                                               // This makes testing in iOS9 
simulator work as expected
+                                               return /OS 9_/.test( ua ) || 
/Version\/9/.test( ua );
                                        case 8:
                                                // Test UA for iOS8. Or for 
simulator look for Version 8
                                                // In the iOS simulator the OS 
is the host machine OS version
diff --git a/resources/mobile.overlays/Overlay.js 
b/resources/mobile.overlays/Overlay.js
index 6822f21..366113d 100644
--- a/resources/mobile.overlays/Overlay.js
+++ b/resources/mobile.overlays/Overlay.js
@@ -19,6 +19,7 @@
        function Overlay() {
                this.isIos = browser.isIos();
                this.isIos8 = browser.isIos( 8 );
+               this.isIos9 = browser.isIos( 9 );
                // https://phabricator.wikimedia.org/T106934
                // tldr: closing keyboard doesn't trigger a blur event
                if ( this.isIos8 ) {
@@ -121,6 +122,11 @@
                        this.$overlayContent = this.$( '.overlay-content' );
                        this.$spinner = this.$( '.spinner' );
                        if ( this.isIos ) {
+                               // FIXME: This should be made future-proof. 
Right now there's no good way to test
+                               //        for all versions below X. 
https://phabricator.wikimedia.org/T126792
+                               if ( !this.isIos9 ) {
+                                       this.$el.addClass( 'overlay-legacy-ios' 
);
+                               }
                                this.$el.addClass( 'overlay-ios' );
                        }
                        // Truncate any text inside in the overlay header.
diff --git a/resources/mobile.overlays/Overlay.less 
b/resources/mobile.overlays/Overlay.less
index a1ff34a..eb15087 100644
--- a/resources/mobile.overlays/Overlay.less
+++ b/resources/mobile.overlays/Overlay.less
@@ -355,11 +355,13 @@
        }
 }
 
-.overlay-ios {
+.overlay-legacy-ios {
        .overlay-header-container {
                position: absolute !important;
        }
+}
 
+.overlay-ios {
        .overlay-footer-container {
                position: absolute !important;
        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id42aad8cd7cb241c5f58042daf322693f1a84e5f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jhobs <[email protected]>

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

Reply via email to