Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Tim Streater
October 12, 2015, 8:41 pm
rate this thread
This has two small html files that may be placed on the desktop. The
viewport.html file loads iframe.html into an iframe, and then the
console reports mouse events.
The console.log messages show what actually transpires. What I'd like
to be able to do is position the mouse over the iframe (black-bordered
box), press the mouse button down, and hold it down while I drag the
mouse out of the iframe and into elsewhere in the viewport
While doing this drag, I want to get mousemove events from the iframe
until the mouse leaves the iframe, and then immediately start getting
mousemove events from the rest of the viewport.
Instead, what I observe (in Safari 9 OS X Mavericks, Safari 5.1 Snow
Leopard, and version 40 or so of Chrome under Linux Mint), is the
1) click button and drag mouse gives mousemove events until the mouse
leaves the iframe.
2) No mousemove events in the viewport-elsewhere area UNTIL I release
the mouse, and then move it again.
Is there a good reason for this? I did wonder if it's because the
elsewhere area does not have focus, so I tried to remedy that by using
the iframe mouseout event to give focus to top.body, but that doesn't
seem to take hold until I release the mouse button, so it didn't help.
Suggestions as to how to fix this or an explanation of why this won't
be possible appreciated.
"... you must remember that if you're trying to propagate a creed of
poverty, gentleness and tolerance, you need a very rich, powerful,
authoritarian organisation to do it." - Vice-Pope Eric