Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about mousedown

Read more about mousedown

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - mousedown

Have elements follow cursor while mousedown is active

I have several picture elements that follow mouse cursor on mousemove event. That script is quite simple and it works great, but I'd like it to run only while the mouse is pressed down so you have a f...
test-img

DearBee

javascript

jquery

mouseevent

mousedown

Votes: 0

Answers: 1

Latest Answer

Your code is almost there, there's just two issues which need addressing. Firstly, you need to know when the mouse is being held down and moving. The nested events are not the best way to do this and ...
test-img

Rory McCrossan

Long Press detection with SwitchMap, Race and Timer

I'm trying to get a single Observable that can distinguish between a regular click (0-100ms) and a long press (exactly at 1000ms). pseudocode user clicks and holds mouseup between 0 - 100ms -> emi...
test-img

Sander Schnydrig

typescript

rxjs

observable

mousedown

mouseup

Votes: 0

Answers: 3

Latest Answer

Not the cleanest solution, but should help you with your problem; you're free to improve it to avoid repetition. const click2$: Observable<UIEventResponse> = mouseDown$.pipe( switchMap((event)...
test-img

Giovanni Londero

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved