Page MenuHomePhabricator

[BUG] Reference highlight misplaced on iPhone X and SE (and others)
Closed, ResolvedPublic

Description

How many times were you able to reproduce it?

Every

Steps to reproduce

  1. on iPhone X load any article
  2. tap on any reference link

Expected results

Ref highlight should surround tapped link

Actual results

Ref highlight off by nav bar height

Screenshots

Environments observed

App version:
6.0.2

OS versions:
iOS 12
Device model:
iPhone X and SE (also seen on iPhone 6s)
Device language:
All

Event Timeline

Mhurd renamed this task from [BUG] Reference highlight misplaced on iPhone X and SE to [BUG] Reference highlight misplaced on iPhone X and SE (and others).Oct 16 2018, 11:24 PM
Mhurd updated the task description. (Show Details)

Looks like it was caused by this:
https://github.com/wikimedia/wikipedia-ios/pull/2641/files#diff-69afa72d39aac175d74cbbd23edca62bR133

Changing that line from...

UIEdgeInsets contentInset = UIEdgeInsetsMake(top, 0, bottom, 0);

...to...

UIEdgeInsets contentInset = UIEdgeInsetsMake(0, 0, bottom, 0);

...fixes the ref highlight issue but breaks the iOS12 workaround which was the purpose of the PR which made the change.

Just realized this bug also manifests in the article search - when you search for a word and then tap the little up/down arrows to jump from match to match the vertical centering is off by the same amount (ie when it scrolls to the new match it's no longer vertically centered between the bottom of the nav bar and the top of the keyboard). The issue also goes a way with the adjustment to the line mentioned in the comment above.

Edit: ticket for this issue: https://phabricator.wikimedia.org/T207408

@JoeWalsh Ideas on a fix which wouldn't break the iOS workarounds?

LGTM on iPhone X on 6.1.0 (1505)

I have asked @Nicholas.tsg to take a look on iPhone SE

@ABorbaWMF Testing on iPhone SE with iOS 12 and Wikipedia app 6.1.0 (1506). As shown in the screencap below this is fixed at least on iPhone SE now that the reference highlight is on the tapped link [2].