TWAIN ActiveX Control, Plug-in, Scanner SDK, Component, HTTP Control/SDK

Dynamsoft TWAIN Products

Support Community for TWAIN Control/Component/SDK for Scanning Solutions
* Login   * Register
* FAQ    * Search

It is currently Sun May 20, 2012 3:14 pm




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: IE8 OnMouseMove events held until mouse "leaves"
PostPosted: Tue Jul 26, 2011 5:41 am 
Offline

Joined: Fri Jul 22, 2011 7:13 am
Posts: 14
I have an OnMouseMove handler on the ActiveX & plugin control that updates a printout with new mouse coordinates.

In IE9, Firefox and Chrome, the OnMouseMove handler is fired correctly while the mouse moves within the surface of the DWT's canvas. This is the expected behavior.

In IE8, the OnMouseMove event seems not to fire (or the handler is not allowed to execute, not sure which) while the mouse is within the region of the surface of the DWT's canvas. Then, when the mouse leaves that region, the events that should have been raised/handled earlier are suddenly released and/or handled all at once.

The "printout with new mouse coordinates" is a <div /> next to the DWT that is prepended with a new line of text. Upon each event, it adds the text "[Event] on image 0 at ([X], [Y])" to the top of this div. The code is as follows, just to be extra clear:
Code:
infoPane.prepend($('<div />').css({ 'white-space': 'nowrap' }).text('Mouse moved on image ' + index + ' at (' + this.plugin.MouseX + ', ' + this.plugin.MouseY + ')'));

But really, I don't understand how this could be a DWT issue: Another event, OnMouseClick, does NOT suffer from the same delays UNLESS the OnMouseMove handler not only exists, but actually adds to the printout. That is, if the printout line is present in the OnMouseMove event handler, then the OnMouseClicks are also held up; if the printout line is removed (but the empty OnMouseMove handler remains) then the OnMouseClicks are not held. So the event must be held up in the browser, since it depends on not whether it is handled, but the manner in which it is handled. But equally puzzling is what would be different about these two handlers that would cause this difference - and only in IE8?

Has this been seen before?


Top
 Profile  
 
 Post subject: Re: IE8 OnMouseMove events held until mouse "leaves"
PostPosted: Tue Jul 26, 2011 12:28 pm 
Offline

Joined: Fri Jul 22, 2011 7:13 am
Posts: 14
By throttling the events in javascript to only interact with the UI from OnMouseMove at most every, say, 200 milliseconds, the problem seems to go away.

Perhaps IE 8 just gets overwhelmed with UI updates.

(I consider this issue closed)


Top
 Profile  
 
 Post subject: Re: IE8 OnMouseMove events held until mouse "leaves"
PostPosted: Tue Jul 26, 2011 5:29 pm 
Offline
User avatar

Joined: Tue Mar 08, 2005 12:23 am
Posts: 1075
I'm glad to hear that you solved the problem by yourself. :)

_________________
Catherine Sea
TWAIN Support Team
TWAIN ActiveX/Plug-in for Web Applications, Scanner COM Control
TWAIN .NET Component/SDK for Desktop Applications

Follow me @Twitter, Facebook
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

It is currently Sun May 20, 2012 3:14 pm


Who is online

Users browsing this forum: EarnereapRirm and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Copyright © 2010 Dynamsoft Corporation. All Rights Reserved. | Knowledge Base | Source Control Blog