Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK Previous
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Language Found: English
Description
Steps to reproduce:
1. Compile the following mxml application into an AIR app with the flex_sdk_4.5 beta build (4.5.0.17726) and launch it
2. Click on the link
3.
<?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <fx:Script> <![CDATA[ [Bindable] private var html:String = "<html><body>This is a <a href='http://www.adobe.com'>Link</a></body></html>"; ]] > </fx:Script> <mx:HTML width="100%" height="100%" htmlText="{html}" /> </s:WindowedApplication>
Actual Results:
Nothing happens. The MOUSE_DOWN event is re-dispatched without the AIR custom properties thus ending in Webkit with clickCount = 0.
Adding Raul's comment from internal watson bug #2723169:
"From my investigation, this is a Flex SDK 4.5 bug as in this version, the mouse events are recreated in order to be dispatched (in mx.managers.SystemManager, look for MOUSE_DOWN listener), but the AIR custom properties of a MouseEvent are not copied (clickCount, commandKey, controlKey).
Because of this, the mouse down event reaches WebKit with clickCount = 0, which basically means: no click on link."
[path_to_flex_sdk_4.5]/frameworks/projects/frameworks/src/mx/managers/SystemManager.as line: 2774
/**
- @private
- Similar to keyDownHandler above. We want to re-dispatch
- mouse events that are cancellable. Currently we are only doing
- this for a few mouse events and not all of them (MOUSE_WHEEL and
- MOUSE_DOWN).
*/
private function mouseEventHandler(e:MouseEvent):voidUnknown macro: { if (!e.cancelable) { e.stopImmediatePropagation(); var cancelableEvent:MouseEvent = new MouseEvent(e.type, e.bubbles, true, e.localX, e.localY, e.relatedObject, e.ctrlKey, e.altKey, e.shiftKey, e.buttonDown, e.delta); e.target.dispatchEvent(cancelableEvent); } }
Expected Results:
The MOUSE_DOWN event must contain the AIR custom properties (clickCount, commandKey, controlKey). Clicking on the link should navigate to www.adobe.com.
Workaround (if any):