Questions tagged [mousedown]

Mousedown is a browser event that occurs when a user clicks the mouse button down on an element.

Mousedown is a browser event that occurs when a user clicks the mouse button down on an element. It usually occurs right before a mouseup event (when the user releases the mouse), and is part of an onclick event, which comprises both the click down and release of the mouse.

416 questions
29
votes
6 answers

Respond to mouse events in text field in view-based table view

I have text fields inside a custom view inside an NSOutlineView. Editing one of these cells requires a single click, a pause, and another single click. The first single click selects the table view row, and the second single click draws the cursor…
paulmelnikow
  • 16,895
  • 8
  • 63
  • 114
23
votes
2 answers

WPF Mouse down event no Coordinates

I am using WPF mouse down event on a control. I want to get the X,Y coordinates but I am getting an error: private void button_MouseDown(object sender, MouseButtonEventArgs e) { double x = e.X, double y = e.Y; } I could not access the…
Ji yong
  • 433
  • 2
  • 5
  • 12
21
votes
3 answers

Getting [NSEvent mouseLocation] in view coordination system

I have an NSView that is catching a mouseDown event. I'm getting the coordination of the mouse click using: - (void)mouseDown:(NSEvent *)theEvent { NSPoint touchPoint = [NSEvent mouseLocation]; //Rest of code } However, this sets clickPoint…
Niv
  • 2,294
  • 5
  • 29
  • 41
18
votes
3 answers

Moving a control by dragging it with the mouse in C#

I'm trying to move the control named pictureBox1 by dragging it around. The problem is, when it moves, it keeps moving from a location to another location around the mouse, but it does follow it... This is my code. and I would really appreciate it…
Paul Ghiran
  • 1,233
  • 1
  • 16
  • 29
16
votes
4 answers

how to implement mousemove while mouseDown pressed js

I have to implement mouse move event only when mouse down is pressed. I need to execute "OK Moved" only when mouse down and mouse move. I used this code $(".floor").mousedown(function() { $(".floor").bind('mouseover',function(){ alert("OK…
M1M6
  • 915
  • 3
  • 17
  • 33
16
votes
3 answers

ng-touchstart and ng-touchend in Angularjs

I have an element which fires functions on ng-mousedown and ng-mouseup. However, It doesn't work on touch screen, is there any directive like ng-touchstart and ng-touchend?
ciembor
  • 7,189
  • 13
  • 59
  • 100
16
votes
1 answer

WPF Mouse Down Event won't fire

I must be doing something stupid here but I cant get a MouseDown event to fire when I am clicking on the UserControl. Driving me Mad. Here's the XAML for the UserControl:
kev3kev3
  • 395
  • 1
  • 6
  • 21
16
votes
3 answers

JavaScript while mousedown

var mdflag; var count = 0; document.addEventListener("mousedown",mdown,false); document.addEventListener("mouseup",mup,false); } function mdown() { mdflag=true; while(mdflag) document.getElementById("testdiv").innerHTML =…
Larry
  • 1,231
  • 4
  • 12
  • 18
14
votes
5 answers

Check if mousedown with an if statement?

Is it possible to do something like this: if ($(this).mousedown() == true) { I thought that would work but it doesn't. Additional details: I'm trying to check if the mouse button is down when the mouse leaves a specific DIV, so if the person is…
android.nick
  • 11,069
  • 23
  • 77
  • 112
14
votes
2 answers

Vue mousemove only after mousedown

How can I trigger a mousemove only if the element is clicked first? I'm trying to utilize this for an audio player timeline. .player__time--bar(@mousedown="setNewCurrentPosition($event)") .slider(role="slider" aria-valuemin="0"…
Giacomo
  • 1,056
  • 4
  • 16
  • 24
14
votes
3 answers

When are tunneling and bubbling events useful in WPF?

I understand how bubbling and tunneling works. However, i'm confused about using them. Here is why: I want to handle a mouse click event. To bubble it, there is MouseDown and, to tunnel it, there is PreviewMouseDown. However, MouseDown doesn't…
SanSolo
  • 2,267
  • 2
  • 24
  • 32
13
votes
3 answers

MouseDown and Click conflict

I have a Drag() method on form_MouseDown event. I also have a click event on the form. The problem is that if I click on the form, MouseDown event gets triggered and it never gets the chance to trigger click event. What is the best way to solve…
Kristian
  • 1,348
  • 4
  • 16
  • 39
9
votes
4 answers

Best way to run mousemove only on mousedown with pure javascript?

I do not want any unnecessary loops occurring for mousemove event. So I became interested, in terms of performance/best practice what would be the best way to run mousemove only while mousedown == true? Currently I'm using: var pressedMouse =…
Alyona
  • 1,682
  • 2
  • 21
  • 44
8
votes
4 answers

mousedown. propagation on siblings event.targets

I have 2 sibling-nodes with 'position absolute' which both handle mousedown event. How can I trigger the handler of 'div 1' when I am clicking on the transparent area of the 'div 2' (on the pic.)
AlaskaKid
  • 197
  • 1
  • 2
  • 9
8
votes
2 answers

detect mouseup outside of mousedown element

I am trying to detect when the mouseup (mouse button released) occurs outside of the element that the mousedown event was triggered on. I have several buttons that I alter the CSS (by using classes) with a mousedown (button press) and completion of…
Rob Emenecker
  • 129
  • 1
  • 1
  • 9
1
2 3
27 28