Skip to main content
May 31, 2013
Question

Inappropriate mouse event coordinates in the WebKit of HTMLLoader/StageWebView

  • May 31, 2013
  • 1 reply
  • 883 views

Hi,

We have a desktp application which incorporates an HTMLRichTextEditor (implemented in HTML/JS and loaded into AIR).
We have run into a big problem with text selection though. It seems that the both the HTMLLoader and the StageWebView are passing wrong mouse coordinates to the WebKit when the cursor is outside of the component.

I've created a sample application which uses mx:HTML (which is a wrapper of the HTMLLoader) and a WebView class (a wrapper aroun StageWebView reference to which is given here).

The application is located here in Dropbox. The source code of the app is here.

The app was built with Flex 4.6 and ran in AIR 3.7

The sample app has a WebView which loads loremipsum and HTML loading some dummy local HTML page. The HTML page uses the JS->AIR bridge to report the mouseevents to a function in AIR. In the snapshot below the selection was started from the first row and then slowly continued to the left. As soon as it reaches the green area the selection changes unexpectably. As it can be seen in the bottom right -> the WebKit has received a mouse event with incorrect coordinates. The reported mouse coordinates seem to be the mouse coordinates within the green component and the selection behaves like that. If the mouse is moved to the blue - the selection changes again (according to the coordinates in the blue area).

The component which uses the StageWebView behaves in absolutely the same way.

I'd assume that I have to post a bug but I decided to post here at first.
I've tried a few workarounds in order to stop and ongoing selection or to change it's behaviour but none of them with any relevant success. Even disabling mouse children for the entire application has no effect on the selection once it's started.

Any help and/or comments would be much appreciated.

Thanks !

This topic has been closed for replies.

1 reply

chris.campbell
Legend
May 31, 2013

Thank you for the heads up.  Do you know if this is a recent change in behavior with AIR (ie. does this occur in previous versions)?  Regardless, could you please open a new bug report on this over at bugbase.adobe.com

Once added, please post back with the URL so that others affected can add their comments and votes and I can follow up internally.

June 3, 2013

Thank you Chris !

I've opened https://bugbase.adobe.com/index.cfm?event=bug&id=3571583. I hope I've filed it correctly with all the necessary information.

I'll be waiting for any updates on the topic.

Thanks again !

chris.campbell
Legend
June 4, 2013

Thanks, the bug report looks great.  I'll have someone take a look and comment back on the report.