question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple <WindowScrollers> on a page cause a race condition

See original GitHub issue

If you have more than one <WindowScroller> on a page the body will, after scrolling, have its pointerEvents style permanently set to none.

The issue is that each instance saves the current pointerEvents value inside its onScroll handler (so it can restore it after scrolling), then sets it to none. When the second scroll handler fires, it sees that pointerEvents is set to none, so when its _enablePointerEventsAfterDelayCallback fires, it “restores” it to none regardless of what the original value actually was. (see this plunker for a demo)

A (relatively) simple fix would be to modify the event handling of <WindowScroller> to just attach a single scroll handler to the document. This handler could modify/restore the body’s pointerEvents style, and pass scrollTop values to mounted components.

I can issue a PR if it’d help.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
karlebertscommented, Sep 7, 2016

That was amazingly fast, thanks again!

1reaction
bvaughncommented, Sep 7, 2016

Sounds reasonable. I greatly appreciate the PR!

As I mentioned, I’m on the road for the next few days- but I’ll try to find time to review it within the next few hours if I can. 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Race conditions and deadlocks - Visual Basic - Microsoft Learn
A race condition occurs when two threads access a shared variable at the same time. The first thread reads the variable, and the...
Read more >
Bearing damage and failure analysis - SKF
Bearings that are worn or damaged usu- ally exhibit identifiable symptoms. Many possible causes could be responsible and need to be investigated († ......
Read more >
Mounting and Dismounting of Rolling Bearings - Schaeffler
A special chapter deals with bearing failures and their causes. The tables in the annex specify bearing numbers, tolerances of bearings and their...
Read more >
RACER: Effective race detection using AspectJ - JPL Technical ...
Abstract. Programming errors occur frequently in large software systems, and even more so if these systems are concurrent. In the past, re-.
Read more >
Roller Coasters and Amusement Park Physics
The motion of objects along curved sections of roller coaster tracks (loops, ... Once more the Fnorm must provide sufficient force to produce...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found