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.

sticky: true repaints frequently

See original GitHub issue

Bug description

setting sticky: true and trigger: click on an element, it seems to repaint the document rather frequently, so much so that the dom can’t be edited from dev console.

(This is happening in chrome, but might be happening in other browsers too.)

Reproduction

  1. visit https://test-tippy-obddnsfyyn.now.sh/

  2. click the button

  3. inspect the tippy element

  4. notice that various dom elements in the dev console are flickering and un-editable:

ScreenRecording2019-07-18at7

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
atomikscommented, Jul 22, 2019

@mreinstein that seems like a good idea, I’ll look into it

1reaction
mreinsteincommented, Jul 22, 2019

sticky updating each animation frame fixes those cleanly without needing to check anything.

I get that the static update each frame is very clean. I think the issue though is that updating essentially does 2 things under the hood each frame:

  • re-draws the element
  • triggers a layout re-flow

For most of those frames, nothing will have changed. I’m wondering if we could useElement.getBoundingClientRect() each frame to detect if the element has changed. That would still trigger layout re-flow, but at least we’re not thrashing the dom with unnecessary re-draws.

https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is My Paint Sticky or Tacky and How to Fix It - TheDIYPlan
One of the most common reasons for sticky paint that won't dry is paint that has been applied too thick, in too many...
Read more >
Tips for Dealing With Sticky Painted Shelves - The Spruce
Shelves often remain sticky long after they have been painted; you can prevent or correct this problem in a variety of ways.
Read more >
CSS Position Sticky Tutorial With Examples[Complete Guide]
Create a new CSS position sticky and get your CSS position fixed with this tutorial that also discusses cross browser compatibility for CSS ......
Read more >
position - CSS: Cascading Style Sheets - MDN Web Docs
To see the effect of sticky positioning, select the position: sticky ... As a user scrolls, the browser must repaint the sticky or...
Read more >
6 Effortless Ways to Make Spray Paint Not Sticky - Repaint Now
The paint you applied may also remain tacky days after application due to “blocking” which keeps paint from drying faster. This is commonly...
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