I tried to restrict mouse movement to div area when the right button is pressed in this div, with jquery library. How can I do this?Or a best question I could do this? similar to restrict movement of a screen portion.
Asked
Active
Viewed 1,822 times
1
-
Repost. Try this solution http://stackoverflow.com/questions/8595909/how-to-completley-disable-any-mouse-click or this: http://stackoverflow.com/questions/3350227/js-restrict-mouse-movement-with-axis-when-shift-pressed-for-draggable-element – ExoticSeagull Mar 12 '13 at 10:59
-
@ClaudioLudovicoPanetta I think you have not understood the question. I do not want to completley disable any MOUSE CLICK. I Need mouse clic events but I need restrict movement only in a specific Div.Please re-think your punctuation – Martin Mar 12 '13 at 11:03
-
Martin - if WTK's answer is wrong, try adding more description to your question - perhaps you can add a diagram or jsFiddle - and show people what you are trying to do. – Raad Mar 12 '13 at 11:07
-
can you explain a little more that why you are doing this ? – Peeyush Mar 12 '13 at 11:09
1 Answers
5
The answer is: you can't.
You can't control on which area user moves his mouse. It's his mouse afterall (joke). In all seriousness - it's probably security/usability/common sense feature. Imagine the Internet where web developers could control area on which user may move his cursor.

WTK
- 16,583
- 6
- 35
- 45