sidebarjs icon indicating copy to clipboard operation
sidebarjs copied to clipboard

Fix Flickering issue

Open omelsoft opened this issue 4 years ago • 1 comments

Flickering Issue when moving up and down a scrollable document while the sidebar is open

See: https://github.com/SidebarJS/angular-sidebarjs/issues/7

This is generated when updating the sidebarjs.scss file and compile the CSS.

Added the following in the --is-moving class:

[sidebarjs-container] { transform: none!important; }

in the following.

[sidebarjs] { @extend %component--full-screen; position: fixed; z-index: 9999; transition: transform 0s $timing $duration; &.sidebarjs--is-visible { @include component--is-visible; } &.sidebarjs--is-moving { transition: none; transform: translate(0, 0); [sidebarjs-container] { transform: none!important; } [sidebarjs-container], [sidebarjs-backdrop] { transition: none; } } } The issue is that every time the user moves up and down the transform property always gets updated. That's the reason for the flickering issue. To fix that, I added an override to force the transform to none.

omelsoft avatar Aug 25 '21 03:08 omelsoft

Hi,I have tryied your css fix, it did fixed the moving sidebar but it looses the transition if you are done scrolling and tryied to open or close the sidebar. the ideal solution is creating a small function to detect scrolling event and add a class like (.sidebarjs--is-scrolling). This is a bug need to be fix in the core plugin

samoel02 avatar Apr 23 '22 00:04 samoel02