EasyUI Forum
April 27, 2024, 06:33:02 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Detect mousedown event on datagrid's scrollbar (SOLVED)  (Read 3604 times)
gordis gmbh
Full Member
***
Posts: 103


View Profile Email
« 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
« Last Edit: December 04, 2020, 03:11:10 AM by gordis gmbh » Logged
gordis gmbh
Full Member
***
Posts: 103


View Profile Email
« Reply #1 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/

How can I identify if the click is on the scrollbar?
Thanks!
Logged
gordis gmbh
Full Member
***
Posts: 103


View Profile Email
« Reply #2 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/
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!