Questions tagged [mousemove]

For issues relating to setting up, subscribing to, or handling mousemove events.

Mousemove is an event that fires when the user moves the mouse owithin the element you registered the event on.

961 questions
16
votes
2 answers

How to detect when mouse has stopped

I have written the following JavaScript code. I am using it to detect when the mouse is moving and when it has stopped. MouseStopped() function is a loop of hundreds of items that will tell me where the mouse has stopped, so I want to call it only…
Hannington Mambo
  • 998
  • 2
  • 13
  • 28
15
votes
2 answers

Move Mouse to Position and Left Click

I'm working on an Windows Form Application in C#, Framework 4 (32 bit). I have a list that holds coords of the mouse, and I can capture them. So far so good. But at some point, I want to go to those coords and left mouse click on it. This is how it…
Mathlight
  • 6,436
  • 17
  • 62
  • 107
14
votes
1 answer

Rotating an element based on cursor position in a separate element

I've been Working on a breadcrumbs directory feature recently that requires an element to rotate based on the cursor x position within the breadcrumbs container element. Long story short, I need the arrow in the lower '#pointer-box' to always point…
ifthatdoesntdoit
  • 211
  • 1
  • 3
  • 8
14
votes
7 answers

Hiding the mouse cursor when idle using JavaScript

Is it possible to use JavaScript to set the cursor attribute to the property none if the mouse is inactive for a certain amount of time (say, five seconds) and set it back to auto when it becomes active again? EDIT: I realize that none is not a…
木川 炎星
  • 3,893
  • 13
  • 42
  • 51
14
votes
2 answers

DoDragDrop disables MouseMove Events

After having started a Drag & Drop operation by DragDrop.DoDragDrop(...) no more MouseMove Events are fired. I even tried AddHandler(Window.MouseMoveEvent, new MouseEventHandler(myControl_MouseMove), true); where the last parameter means I even…
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
14
votes
1 answer

equivalent to mousemove for mobile devices

Was wondering if there were an equivalent for mousemove for mobile devices, such as touchmove or touchdrag or something. I have an image within a container which can be panned on hover using mouse move. Is there a way I can optimise it for mobile…
user2835060
  • 193
  • 2
  • 3
  • 8
14
votes
3 answers

Ignoring child elements on mousemove

I try to get mouse position relative to an element using mousemove. It works fine, but when the mouse hover a child element, the coordinates are relative to this child. I want the mouse position relative to the parent div, not the child. See this…
Julian
  • 698
  • 2
  • 8
  • 17
12
votes
3 answers

Robot.mouseMove does not work at all in Mac OS X

I created java file in IntelliJ IDE, with that code import java.awt.AWTException; import java.awt.MouseInfo; import java.awt.Robot; public class JavaRobotExample { public static void main(String[] args) { int x = 12, y =…
R.edd
  • 121
  • 1
  • 3
12
votes
3 answers

Clicking on given coordinates of element in protractor

I want to click on a specific location of my canvas element, so I wrote the following Protractor code: var canvas = element(by.id("canvas")); var clickCanvas = function(toRight, toBottom) { browser.actions() .mouseMove(canvas, -toRight,…
Bowzer2
  • 273
  • 1
  • 2
  • 7
11
votes
2 answers

jQuery mousemove() is called even if the mouse is still

For me, if I try this example: http://jsfiddle.net/bY3CC/3/ the "mouse moved" text appears even if I move my mouse over the document and then I let it still... Why's that? ;\ And also, seems like the message only appears in Chrome.... Strange :-s
XCS
  • 27,244
  • 26
  • 101
  • 151
11
votes
5 answers

Move mouse cursor on an element

How can I change position of the mouse cursor on an element when page loading is over with jQuery?
Chalist
  • 3,160
  • 5
  • 39
  • 68
10
votes
0 answers

JavaScript MouseEvent.movementX and movementY large spikes

After a pointer lock with Chrome, if you move the mouse, MouseEvent.movementX and MouseEvent.movementY will sometimes return a very large number that seems to be around half the size of the window. Here is a minimal code example: …
CasualKyle
  • 433
  • 4
  • 17
10
votes
3 answers

javascript use drag to move element

How does one set the position of an element? When the user drags an element (an image), I'd like to have it move synchronously. I see that my "mousemove" handler is being called. However I cannot get the element to actually move. Here's the…
Peri Hartman
  • 19,314
  • 18
  • 55
  • 101
10
votes
3 answers

MouseMove event repeating every second

http://jsfiddle.net/MrkY9/ My computer (and so far, no other computer among my coworkers) is exhibiting an issue in Chrome, IE, and Safari (but not in Firefox). Simple mousemove code, such as the following (already running on the fiddle above)…
Scott Mermelstein
  • 15,174
  • 4
  • 48
  • 76
10
votes
3 answers

Global Mouse Moved Events in Cocoa

Is there a way to register for global mouse moved events in Cocoa? I was able to register for the events using Carbon's InstallEventHandler(), but would prefer a Cocoa equivalent. I have looked for NSNotificationCenter events, but there doesn't seem…
Colin Gislason
  • 5,449
  • 2
  • 27
  • 22
1
2
3
63 64