Closed Bug 1968162 Opened 8 months ago Closed 8 months ago

Can't switch slides on slideshare.net by clicking on slides

Categories

(Web Compatibility :: Site Reports, defect, P1)

Tracking

(Webcompat Priority:P1, Webcompat Score:10)

RESOLVED WORKSFORME
Webcompat Priority P1
Webcompat Score 10

People

(Reporter: jrmuizel, Unassigned)

References

()

Details

(Keywords: webcompat:contact-ready, webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat:sightline])

User Story

platform:windows,mac,linux,android
impact:workflow-broken
configuration:general
affects:all
branch:release
user-impact-score:1600
diagnosis-team:layout
outreach-assignee:jrmuizel

This works in Chrome.

Severity: -- → S2
User Story: (updated)
Webcompat Priority: --- → P1
Webcompat Score: --- → 9
Priority: -- → P1
Whiteboard: [webcompat:sightline]

Strange behavior that it works on pages 8-11,19-32,37,39-41,44,58...

The slides are scrolled into view using window.scrollBy(), which is referenced exactly once in the sources. If you break there after clicking on one of the slides that work and go up 3 stackframes, you're paused at the last statement of this code:

onClick: () => {
  if (u) {
    u(e);
    return
  }
  S(e)
},

u is a click handler that is passed to the React component as a prop, if it isn't set then S is called instead, which scrolls the slide into view. If I set a logpoint in the code above logging u, I see that it's undefined when I click on one of the slides that work and is a function for those that don't work. If I set the same logpoint in Chrome, u is undefined for all slides.
I couldn't figure out yet why this is different in Firefox.

Hmm, the site is shipping different code for Chrome and Firefox, which makes it hard to compare. I also noticed that in Firefox the blur handlers for the slide previews are not consistently called (hence the popup that shows up when hovering over some of the slide previews doesn't disappear when the mouse leaves the slide preview, unlike Chrome). Maybe the Firefox version of the site is simply buggy.

Chromemask doesn't help. I haven't verified we're actually getting the same code as chrome with the mask on, though

With Chromemask the code I looked at all looked to be the same size (to the level of size exposed in devtools interface; I didn't go and check the size headers, for example). I also tried disabling ETP; no change (no surprise)

Note also I didn;'t examine all the code files

Tom, you might want to have a look; I'm not so good at the devtools level

Flags: needinfo?(twisniewski)

Hmm, the site is shipping different code for Chrome and Firefox

I spoke too soon, the code is actually the same, I was confused by the site using different focus and blur handlers for the slide previews in Firefox vs. Chrome (and the handlers that it uses in Firefox are in a webpack chunk that did not get loaded in Chrome).
For scrolling the slides into view, the site seems to use the same handlers in Firefox and Chrome.

Webcompat Score: 9 → 10

I found the code that is switching between the different components for the slide previews:

let e = CSS.supports('selector(:popover-open)'),
t = CSS.supports('anchor-name', '--foo-bar');
h(e && t)

If I patch CSS.supports() to return true for CSS.supports('anchor-name', '--foo-bar') before the page is rendered then switching slides starts working for all slides. However, the popovers that are shown when hovering over a slide preview are misplaced, covering up most and sometimes all of the slide preview, making it hard or impossible to click on it, so an intervention wouldn't really fix the site.
So this is a combination of a missing feature (anchor positioning) in Firefox and a site bug in its fallback code for browsers that don't support anchor positioning yet.

User Story: (updated)
Webcompat Score: 10 → 9
Flags: needinfo?(twisniewski)
User Story: (updated)
Webcompat Score: 9 → 10

This also reproduces in Safari

But it looks like they fixed it. Holger, is it easy for you to check what changed?

Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → WORKSFORME
Flags: needinfo?(hbenl)

All I can say is that the changes are non-trivial:

  • the React component trees for the slide previews used to look different in Firefox vs. Chrome, now they look the same
  • the focus and blur handlers mentioned in Comment 8 are now the same in both browsers
  • the CSS.supports() calls mentioned in Comment 9 now appear in two different functions
Flags: needinfo?(hbenl)
Depends on: 1988225
No longer depends on: css-anchor-position-1
You need to log in before you can comment on or make changes to this bug.