Twipped / Kalendae

A javascript date picker that just works.
MIT License
1.99k stars 285 forks source link

Right clicking on the calendar triggers changes. #183

Open miuy56dc opened 8 years ago

miuy56dc commented 8 years ago

If use the event mousedown when use right mouse button, it is will display a menu and if use the event it won't have a side affect.

Twipped commented 8 years ago

I had a reason for going with mouse down instead of click, but it's been a few years. Probably just response time, I wanted it to react immediately to input. I think I was planning to support dragging across dates, and just never got around to implementing it. I'd rather detect the right click and not update in that case.

I'll see about addressing it next time I'm in the codebase.

miuy56dc commented 8 years ago

There is another question about use mousedown. Whichever left or right mouse down, it will trigger a view-changed event, and I subscribe the view-changed event to do something. But if I choose the wrong date, it is also trigger the view-changed event. If use click I can move the mouse and it won't trigger the event.

Twipped commented 8 years ago

Hmm, yes, it probably shouldn't trigger the event until mouse up. I'll look into that at the same time.