Page MenuHomePhabricator

[BUG] iOS simulator : hideRedLinks has unsupported JavaScript code for Safari 9.3
Closed, ResolvedPublic

Description

How many times were you able to reproduce it?

Everytime when I run wikipedia-ios in iOS simulator 9.3 (10.3 works well)

Steps to reproduce

  1. build Wikipedia target and run it in iOS simulator iPhone 5 - iOS 9.3
  2. open any article with leading image
  3. image describing the article is absent at top of the page

Expected results

it should be an image in top of article
really works well in iOS simulator 10.3.1

Actual results

no image

Screenshots

Simulator Screen Shot 4 июля 2017 г., 18.12.44.png (640×1,136 px, 79 KB)

Environments observed

App version: 5.5.1
OS versions: macOS 10.12 iOS simulator sdk 9.3
Device model: simulator iphone 5
Device language: en

Regression?

I don't know

Reason

redLinkAnchorsInContent returns NodeList and applies forEach method for it, but it looks like forEach is supported for NodeList in 10+ version of Safari (webkit) (https://developer.mozilla.org/en/docs/Web/API/NodeList#Browser_compatibility)

not working

redLinkAnchorsInContent(content).forEach

fix

Array.from(redLinkAnchorsInContent(content)).forEach

Event Timeline

yangand renamed this task from [BUG] hideRedLinks has unsupported JavaScript code for Safari 9.3 to [BUG] iOS simulator : hideRedLinks has unsupported JavaScript code for Safari 9.3.Jul 4 2017, 4:02 PM

@Mhurd, you may want to confirm that Array.from() is polyfilled too.

@ABorbaWMF can you test the current store version on your 9.x device? If this is happening in the wild, we should cut and ship a 5.5.2.

@yangand thanks for catching and documenting this!!!

@Mhurd @JMinor I am able to repro on develop, but not on the 5.5.1 branch. The regression was introduced after the 5.5.0 & 5.5.1 releases split off of develop.

Thanks @JoeWalsh I wondered, as this ticket is not version tagged and I don't recall it going through QA or sign-off

JMinor lowered the priority of this task from High to Medium.Jul 6 2017, 10:47 PM
JMinor moved this task from Needs Triage to Engineering Backlog on the Wikipedia-iOS-App board.

@JMinor I tried with the store app 5.5.1 (1164) on the iPhone 4 with iOS 9.3 and I saw lead images for all the articles I tapped. I noticed it took a longish amount of time for the image to load. I also noticed in the screenshot of the original bug it looks like the article is still loading. Let me know if there's anything else I should try.