Closed Bug 1015725 Opened 10 years ago Closed 9 years ago

can't expand sub-entries in Wired "burger" menu

Categories

(Web Compatibility :: Site Reports, defect)

Other
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: hsteen, Unassigned)

References

()

Details

(Whiteboard: [mobile-compat-form][lib-mobify] [sitewait])

Attachments

(2 files)

Site: http://wired.com
can't expand sub-entries in Wired "burger" menu

:: Steps To Reproduce

Go to Wired, click through to an article. Click/tap the top-right "burger" menu icon and try to click/tap a section that has sub-sections (like "Security" - they start with a plus to indicate thet you can expand them). Nothing happens.

This works fine in Chrome on Android.

:: Expected Result

Submenu

:: Actual Result

Nothing

:: Additional Information

Software Version: 29
Reporter's User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
Might be related to bug 1015600.

Mobify sets up the action here:

e(".sidebar > ul > li > h6").tap(f)
Whiteboard: [mobile-compat-form] → [mobile-compat-form][lib-mobify]
Attached image wired.png
.tap() is a zepto.js method. Oddly enough, window.Zepto is undefined (but autocompletes, so it's actual value is `undefined` somehow) in Firefox for Android, but exists ("function (e,t){return T.init(e,t)}") in Chrome Mobile.

Looking at the source, they're not serving us mobify.js? (see screenshot)
Attached image wired.png
.tap() is a zepto.js method. Oddly enough, window.Zepto is undefined (but autocompletes, so it's actual value is `undefined` somehow) in Firefox for Android, but exists ("function (e,t){return T.init(e,t)}") in Chrome Mobile.

Looking at the source, they're not serving us mobify.js? (see screenshot)
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Mobify replaces the whole page - including the script tag loading mobify.js - using document.write(). This will confuse the heck out of you until you realise it's happening. This might also be the reason dev tools think Zepto exists when it's actually undefined.)
Hm.. are you saying that the Zepto script might not survive the document.write() in Firefox while it does in Chrome?? I wonder if that's the explanation..
adding the needinfo from hallvord to mike ;)
Flags: needinfo?(miket)
(thanks Karl)

@Hallvord, yep... it looks like it. See https://miketaylr.com/bzla/docwrite.html. In Firefox and Presto Opera, the reference to Zepto doesn't exist. In Chrome/Safari it does.
Started talking to our Mobify contacts about this issue.
Hi everyone, Shawn from Mobify here! It's a well known problem for us that in non-WebKit/Blink based browsers (Firefox, IE), doing a document.open causes us to lose references to objects (although I believe this is how the spec says it should work). In order to get around this in Mobify.js 1.1, we actually re-inject the libraries we need as an inline script when rendering the client-side mobile templates. So the original "Zepto" that is bound to window on the first load gets blown away by our use of document.open/write, but afterwards, we re-inject Zepto as an inline script and attach it to Mobify.$. If you open the inspector and have a look at Mobify.$, you'll find all of the Zepto-y goodness.

In our new version of the framework called adaptive.js, we simply re-include the adaptive.js script in the page (and we ensure we don't run our adaptations) in order to have access to the APIs that are needed.

I just had a look at the code and it seems like the reason is in fact caused by the Wired teams use of window.Zepto, which won't be an issue on iOS Safari and Android Chrome. I will sync up with Hallvord to chat with the team at Wired to get it fixed!
Thanks Shawn!
I hear a fix should be coming soon :)
Whiteboard: [mobile-compat-form][lib-mobify] → [mobile-compat-form][lib-mobify] [sitewait]
Site is completely redesigned, this bug is not relevant anymore.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Blocks: mobify
Product: Tech Evangelism → Web Compatibility
Component: Mobile → Site Reports
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: