question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can I get different events between mouseup and mousedown?

See original GitHub issue

Colorpicker only has one callback for selecting colors. I need to distinguish mouseup and mousedown events.

While dragging the picker – this means “I’m choosing a color, not finished.” When I picked a color from the palette or released the picker – this means “I’m finished to choose.”

I’m building a web-based content editor and I would like to push an undo history only when a user has finished choosing a color. Currently, tons of history had been pushed while choosing a color 😦

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
lqezcommented, Nov 18, 2019

Awesome!

1reaction
easylogiccommented, Nov 18, 2019

@lqez

I released codemirror-colorpicker v1.9.53 and @easylogic/colorpicker v1.9.65.

Please check it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's the difference between 'mouseup' and 'click' events?
I think Mouse Down and Mouse Up events give you further control over the click event. It divides the click event ...
Read more >
MouseDown, MouseUp events | Microsoft Learn
MouseDown and MouseUp events enable you to distinguish between the left, right, and middle mouse buttons. You can also write code for ...
Read more >
click, mousedown, mouseup, dblclick - Events - QuirksMode
Test IE 5.5 IE 6 On the window No No On the window Are these events available on the window? Are these events available on... On...
Read more >
Mouse events - The Modern JavaScript Tutorial
Events order​​ As you can see from the list above, a user action may trigger multiple events. For instance, a left-button click first...
Read more >
Element: mouseup event - Web APIs | MDN
mouseup events are the counterpoint to mousedown events. Syntax. Use the event name in methods like addEventListener() , or set an event handler ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found