CStepControl (Step Input Control)

integer

percent

decimals=1

decimals=2

select

==> Fixing the bug "Can't get pointerup event" for e.which==1

(1) Press down the left button of the mouse
(2) Press down the right button of the mouse while keeping the left button down
(3) Let the left button up, which surprizingly won't generate "pointerup" event for e.whcih==1
It looks like pointer was captured for all buttons in the step (1)
(4) Let the right button up, which finally generates "pointerup" event for e.which==2

The solution is relase the pointer capture whichever button is up.
So don't check which button is up in the "pointerup" handler.

==> Disable the context menu

Disable the context menu on button
to prevent the context menu from interfering
pointer capture & release

el_btn.addEventListener("contextmenu",function(e){
	e.preventDefault();
});