EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: gordis gmbh on December 03, 2020, 10:00:42 AM



Title: Detect mousedown event on datagrid's scrollbar (SOLVED)
Post by: gordis gmbh on December 03, 2020, 10:00:42 AM
How can I determine if the mouse is clicked on datagrid's vertical/horizontal scrollbar?
Please note that the datagrid-scrollbars may not be present always. And if they are present, how can I ignore the mousedown event on it.

As seen in the screencast below, a warning is displayed when the user clicks outside the row being edited.
But the warning also gets displayed when the click is on datagrid's vertical scrollbar.

Screencast: https://streamable.com/5eawxt (https://streamable.com/5eawxt)


Title: Re: Detect mousedown event on datagrid's scrollbar
Post by: gordis gmbh on December 03, 2020, 11:31:46 AM
I have created a demo to demonstrate the problem - click on the parts of datagrid while having a row in edit mode:
http://jsfiddle.net/2nx5w47z/ (http://jsfiddle.net/2nx5w47z/)

How can I identify if the click is on the scrollbar?
Thanks!


Title: Re: Detect mousedown event on datagrid's scrollbar
Post by: gordis gmbh on December 04, 2020, 03:10:35 AM
I found a solution to detect mousedown events on scrollbars and ignore them. Here is the updated demo:
http://jsfiddle.net/k8ecnmfp/ (http://jsfiddle.net/k8ecnmfp/)