# mouseDragged event problem with window scaling

**URL:** <https://forum.inductiveautomation.com/t/mousedragged-event-problem-with-window-scaling/20920>\
**Category:** Ignition\
**Created:** [November 17, 2018, 10:10am UTC](https://forum.inductiveautomation.com/t/mousedragged-event-problem-with-window-scaling/20920 "2018-11-17T10:10:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [November 17, 2018, 10:10am UTC](https://forum.inductiveautomation.com/t/mousedragged-event-problem-with-window-scaling/20920/1 "2018-11-17T10:10:11Z")

</div>

Hi  
I create a slider template and it works fine. I use mouseDragged event to get mouse position and change the slider x position relatively. I face a problem that when window maximize or I just manually scale up the slider template in run time when I press and hold mouse to change value, the mouse always left behind the handler. The bug effect on how much the template scale, the more scale the more offset.  
Vice versa if I scale down template, this time the handle left behind the mouse icon.  
In both cases I have some offset with my mouse icon and slider handle.  
[Slider v1.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/634fc0bc20750f35d63ab94a02257cd23272c0c0.proj) (10.1 KB)  
what is the solution to prevent this behavior?
