scrollY disable
See original GitHub issueI use the code
this.scrollbar.disabled = true;
and after used it
this.scrollbar.disabled = false;
but the function handleScroll doesn’t been used
<perfect-scrollbar #scrollbar (psScrollY)="handleScroll()">
Excuse me for my poor English! Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How to disable scrolling temporarily? - javascript
The scroll event cannot be canceled. But you can do it by canceling these interaction events: Mouse & Touch scroll and Buttons associated...
Read more >How to disable scrolling temporarily using JavaScript
Whenever scrolling has to be disabled, this class is added to the body using the document.body.classList.add(“classname”) method. This method ...
Read more >How to disable scrolling on a webpage with JavaScript
In this method we use CSS to disable the scrolling on web pages. In CSS class we set the height to 100% and...
Read more >3 Ways To Disable Scrolling In Javascript - Code Boxx
3 Ways To Disable Scrolling In Javascript · Force scroll the user back to a specific spot or element – window. · Hide...
Read more >Prevent Scroll On Scrollable Elements [JS & CSS] - Alvaro Trigo
There's another way to disable scrolling that is commonly used when opening modals or scrollable floating elements. And it is simply by adding ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sconix I spent all morning looking at docs, googling, playing with APIs and it was a pain to find a working solution.
@yingchy1996 In my app I have a signature component that needs to have scrollY and scrollX disabled when a patient touches to sign if the user is on iPad/phone. To accomplish this I created event handlers for touch up/down on my signature pad and removed the scrollbar handlers while my signature pad was being used. I am using perfect-scrollbar as a component. Here is an example:
` class myComponent {
@ViewChild(‘scrollbar’, { static: true }) scrollbar: PerfectScrollbarComponent; public config: PerfectScrollbarConfigInterface = {}; private psHandlers: string[];
constructor(){ this.config.handlers = this.scrollbar.directiveRef.ps().settings.handlers; this.signaturePad = new SignaturePad(this.canvas.nativeElement, { onEnd: () => { this.config.handlers = this.psHandlers; }, onBegin: () => { this.config.handlers = []; this.showPrevious = false; }, }); }
}
and the .html:
<perfect-scrollbar #scrollbar class=“scrollable-form” [config]=“config”></perfect-scrollbar>`
thanks!