📜 ⬆️ ⬇️

Feature position: fixed, or why I had to block side vertical buttons like "Leave your review"

position: fixed
The described effect is observed under Firefox and on weak laptops, for which this combination is dedicated to users.


Problem


When there is an element on the page with position: fixed , in Firefox the smoothness of page redrawing during scrolling is sharply deteriorating: the page scrolls noticeably slower and in the page area, on the same level as this element, there are distortions. And with all this CPU is heavily loaded. All this creates discomfort when surfing.


')
Previously, such elements were very rarely found on the network, but recently many sites have begun to install scripts for collecting feedback services . And this led to the appearance of various hanging side buttons on such sites. Reviews are, of course, a good thing, but reading these sites is accompanied by the described brakes, which I could no longer tolerate.

The side panel on Habré became the last straw, and it just made me act.


Decision


Most likely, most will advise to buy a more powerful computer and not to bathe. But I have to manage with what we have, so this is not our way :)

I figured out popular services, tritely adding to AdBlock :
|http://*uservoice.com/*/tab.js?*
|http://reformal.ru/tab.js?*


With Habr so roughly it will not turn out, as I use this socket very often. But I couldn't leave it with fixed either. Starting to look for styles and scripts, I saw that I was not the only one . But this decision did not suit me, since it simply removes the panel, and the author himself wrote that I would like to see it once, maybe in another place ...

Then I tried to hide the panel on onscroll - and it worked. Not ideally true, but still the panel really hides as soon as scrolling begins and all the brakes disappear. And at the end of the scrolling, it appears in its place.

Userscript for Greasemonkey here .

Here is a simple solution.

Source: https://habr.com/ru/post/64972/


All Articles