ngx-drag-scroll icon indicating copy to clipboard operation
ngx-drag-scroll copied to clipboard

scrollbar-hidden doesn't work when you resize the browser window

Open Exocomp opened this issue 5 years ago • 3 comments

I'm using the following:

Angular 7.2.7 ngx-drag-scroll 7.1.4 Chrome 71.0.3578.98

  • Set 'scrollbar-hidden' to true with a window size that accommodates all the drag-scroll-items.
  • Then resize the window and you will see the scrollbars (both horiz and vert).

If you refresh the browser window so that the component is reinitialized then it works, so the issue is only when the browser window is large and resized to small.

Exocomp avatar Mar 10 '19 19:03 Exocomp

I have a hack to resolve the issue (just working with the public members), calling 'ngAfterViewInit' on window resize will resolve the issue. It's ugly but for the time being will suffice until this is resolved cleanly.

I see that there is already a private function 'onWindowResize', so a better solution would be to handle it cleanly in there.

Exocomp avatar Mar 11 '19 22:03 Exocomp

Were you using Windows Chrome or MacOS Chrome?

bfwg avatar Feb 10 '20 18:02 bfwg

You can use bellow style to fix this problem. Enjoy it.

::ng-deep {
  .drag-scroll-content {
    width: initial !important;
  }
}

Reza-Javadpour avatar Feb 14 '21 21:02 Reza-Javadpour