Hello Thomas,
> However, your questions belong in your posting (so they can be read without
> Web access and without your readers copy-pasting them and inserting quote
> characters manually[1]), and your test case should be Valid to begin with.
Thanks for the fair reprimand, I humbly submit and correct myself.
Here's link to valid testcase:
http://testarea.s3.lv/JSButton/JSTest.html
There I've set up a simple solution to track what events occour when
user moves/clicks mouse.
The questions that are puzzling me, are:
[Testing on MSIE 7.0.5730.11]
1. When performing mouse click on the button, it generates four event
sequence: a) mousedown, b) mouseup, c) click, and d) mousemove. Why
does it generate the d) mousemove event?
2. Default behaviour of mousemove event is cancelled, to avoid the
default drag action. Now the event sequence, when user clicks on the
button and drags the mouse cursor out of the button area, and releases
the button is the following: a) mousedown, b) series of mousemove, c)
mouseout, d) mousemove, e) mouseover, f) series of mousemove, and
finally g) mouseup. I am puzzled about the d) mousemove + e)
mouseover, as if happens exactly after the mouseout, when the cursor
has left the button area. It's confusing, because it makes the code
thinkg that the cursor has returned to the button area. Another thing
that surprised me, was that mousemove events keep firing even when the
cursor is being moved around outside the button area.
[Testing on FF 3.0.3]
3. Happily, there's no extra mousemove event after mouse click.
However, the [click]&[drag outside] doesn't work as I hoped, and I
feel there's something connected with the way how FF handles the event
capturing/bubbling.
I need some advice, how to fix this, with some sort of good
streamlined universal code. I need no backwards compatibility down to
Netscape 4, but having a code that would run on MSIE, FF and Opera
that are at their most recent updates, is a must.
Thanks for the advice!
Regards,
Passiday