Re: [FlexJS] findPopupHost issue

2017-07-21 Thread Josh Tynjala
This type of issue used to get me all the time with the classic Flex SDK.
I'd have some subclass of Panel or something, but I'd have some kind of
selectedItem property on it that dispatched Event.CHANGE. If I had a child
that was a Slider or something, the slider's Event.CHANGE would bubble, and
I'd have something higher up in the display list thinking that my Panel
subclass' selectedItem was changing when it wasn't.

Most of the time, that's not an issue, but every once in a while, I'd see
an event listener getting called way too often. If you aren't expecting
that, there can be weird side effects. Performance is obviously a concern,
but also, if your listener triggers some change to the UI, that could
happen at times when it doesn't make any sense, and it's not necessarily
immediately clear why.

(Just thought I'd put a real world story behind why it's good for FlexJS to
avoid bubbling in custom events)

- Josh

On Fri, Jul 21, 2017 at 7:25 AM, Alex Harui 
wrote:

> I think we can use setParentTarget to get bubbling to work reliably with
> custom events, but as Peter said, I don't think we want to set up
> parentTarget's just-in-case.  Bubbling custom events is not a recommended
> practice as was mentioned in some other thread recently.
>
> Imagine if you had a Panel as a child of a larger Panel.  Bubbling a close
> event from the inner Panel could easily cause the outer Panel's close
> handler to also fire.
>
> My 2 cents,
> -Alex
>
> On 7/21/17, 6:22 AM, "Peter Ent"  wrote:
>
> >I needed events to bubble for the drag and drop work. While that was fine
> >for the Flash Player, the FlexJS/Google/Browser event mix didn't work.
> >Alex suggested I used setParentTarget on the event to work up the tree and
> >then the event would be dispatched at each level, thus mimicking bubbling.
> >I did this exclusively for drag events (see DragEvent class).
> >
> >Rather than putting that in as the solution for this, I took a simpler
> >approach.
> >
> >‹peter
> >
> >On 7/21/17, 2:35 AM, "Harbs"  wrote:
> >
> >>Bubbling does not work very well in FlexJS in general.
> >>
> >>When you can rely on native browser event bubbling, it usually works
> >>okay, but custom events don¹t bubble.
> >>
> >>> On Jul 21, 2017, at 1:49 AM, Justin Mclean 
> >>>wrote:
> >>>
> >>> Hi,
> >>>
>  The issue was that the TitleBar was dispatching "close" with
> bubbles=true.
>  This works fine on SWF but not on the HTML platform without some extra
>  work. So I just had PanelView intercept the event and dispatch one
> from
>  its strand.
> >>>
> >>> Out of interest is this because of a missing cloneEvent method or that
> >>>it wasn¹t listening on a parent of the item that dispatched the bubbling
> >>>event or something else?
> >>>
> >>> Thanks,
> >>> Justin
> >>
> >
>
>


Re: [FlexJS] stopImmediatePropagation

2017-07-21 Thread Harbs
Yes. That seems to be the case:
https://github.com/google/closure-library/blob/608e0eaaa42bb5f041a7f067f254907d47edf7d1/closure/goog/events/eventtarget.js#L371
 


> On Jul 21, 2017, at 5:18 PM, Alex Harui  wrote:
> 
> I think other goog code updates currentTarget as needed.  They are the
> same when no capture or bubbling, IIRC.
> 
> -Alex
> 
> On 7/20/17, 11:52 PM, "Harbs"  wrote:
> 
>> Yes. I need to copy the code from BrowserEvent.
>> 
>> Interestingly, goog.Events does not distinguish between target and
>> currentTarget. That does not seem very useful:
>> 
>> * Target of the event.
>>  * @type {Object|undefined}
>>  */
>> this.target = opt_target;
>> 
>> /**
>>  * Object that had the listener attached.
>>  * @type {Object|undefined}
>>  */
>> this.currentTarget = this.target;
>> 
>>> On Jul 21, 2017, at 9:21 AM, piotrz  wrote:
>>> 
>>> Ahh Sorry I missed the point in his post. Do you see some solution ?
>>> 
>>> Piotr
>>> 
>>> 
>>> 
>>> -
>>> Apache Flex PMC
>>> piotrzarzyck...@gmail.com
>>> --
>>> View this message in context:
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>>> ex-development.247.n4.nabble.com%2FFlexJS-stopImmediatePropagation-tp
>>> 63418p63479.html=02%7C01%7C%7C33b41ee272044f297c9208d4d005185f%7Cfa7
>>> b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636362167683568915=xo66CMSg
>>> ME%2BdFt7dg5qU6%2BYv7quJw6REm%2B5mKJbwpS0%3D=0
>>> Sent from the Apache Flex Development mailing list archive at
>>> Nabble.com.
>> 
> 



Re: [FlexJS] String.match()

2017-07-21 Thread Harbs
lists.apache.org  displays it fine:
https://lists.apache.org/thread.html/ec0b951752140ad0cd56319b9629cc4a7e097487fd47c84649ffc352@%3Cdev.flex.apache.org%3E
 


I think you missed my last point.

The fact that JS throws an error actually uncovered a bug in my code. When you 
construct an invalid regex in Flash, you get a RegExp object which will NEVER 
match anything. It’s a valid RegExp object with an invalid expression. That’s 
nonsensical. There’s no legitimate reason to use a regex which does nothing.

The JS behavior which throws an error makes much more sense, so I’m currently 
of the opinion that we shouldn’t be fixing this at all.

Harbs

> On Jul 21, 2017, at 5:13 PM, Alex Harui  wrote:
> 
> My email totally mangled your post.  Anyway, if you think you've got code
> that is equivalent to Flash's  String.match, that's good enough for now.
> If folks find issues later we can improve on the utility function.
> 
> If you want to alter the compiler output, see how I handled Array.sortOn
> in FunctionCallEmitter.java.  I think you can do something similar for
> String.match and String.search.
> 
> Thanks,
> -Alex
> 
> On 7/20/17, 2:28 PM, "Harbs"  > wrote:
> 
>> No. We thought that the “?” found the string in Flash. It does not.
>> 
>> trace("https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww 
>> 
>> w.google.com 
>> %2Fsearch%3Fq%3Ddogs=02%7C01%7C%7Ce68f4223e52d48e8c03908d
>> 4cfb6524c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636361829356324151&
>> sdata=voY1pLBiaj2u1GDu0YeKMipu%2FGRHwMWQzRRA0JCTkZc%3D=0".match("
>> ?"));
>> trace("https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww 
>> 
>> w.google.com 
>> %2Fsearch%3Fq%3Ddogs=02%7C01%7C%7Ce68f4223e52d48e8c03908d
>> 4cfb6524c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636361829356324151&
>> sdata=voY1pLBiaj2u1GDu0YeKMipu%2FGRHwMWQzRRA0JCTkZc%3D=0".search(
>> "?"));
>> trace("https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww 
>> 
>> w.google.com 
>> %2Fsearch%3Fq%3Ddogs=02%7C01%7C%7Ce68f4223e52d48e8c03908d
>> 4cfb6524c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636361829356324151&
>> sdata=voY1pLBiaj2u1GDu0YeKMipu%2FGRHwMWQzRRA0JCTkZc%3D=0".indexOf
>> ("?"));
>> 
>> outputs:
>> 
>> null
>> -1
>> 29
>> 
>>> On Jul 21, 2017, at 12:00 AM, Alex Harui >> >
>>> wrote:
>>> 
>>> I think I'm still confused.  My current thinking is that in Flash there
>>> are strings you can pass in that are "invalid RegExp" that will still
>>> find
>>> matches in a string.  Isn't that what Yishay showed?  IOW, passing in
>>> just
>>> "?" in Flash will find question marks in a string but is an error in JS
>>> because it isn't valid RegExp.
>>> 
>>> So, right now I think the utility function needs to catch the error and
>>> either escape the string so it is valid RegExp and call match() or use
>>> indexOf() and compute the same result.  It should not always return
>>> null.
>>> Then I think it would completely implement how it worked in Flash and
>>> the
>>> users won't have to figure out how to regex-ify the strings in the apps
>>> they are porting.
>>> 
>>> My 2 cents,
>>> -Alex
>>> 
>>> 
>>> 
>>> On 7/20/17, 12:55 PM, "Harbs" >> 
>>> >> wrote:
>>> 
 After all this discussion, I’m having second thoughts about this whole
 thing.
 
 What’s the point of using an invalid RegExp that will not match
 anything?
 
 I think the JS behavior makes more sense than the Flash behavior. If a
 RegExp is invalid, it should throw an error rather than never matching
 anything. The use of such a RegExp in the first place can only be
 described as a bug.
 
 “Fixing” the JS behavior to match the Flash behavior is the wrong thing
 to do.
 
> On Jul 20, 2017, at 10:34 PM, Harbs  > wrote:
> 
> new RegExp({})
> returns:
> /[object Object]/
> 
> I think the wrapping that I did in the code I already committed is
> correct:
> 
> try{return input.match(pattern);}
> catch (e:Error){return null;}
> 
> If the try fails, that means the RegExp is an invalid expression and
> will not match anything in Flash. In that case, match should always
> return null and search should always return -1.
> 
> I do think that 

Re: [FlexJS] findPopupHost issue

2017-07-21 Thread Alex Harui
I think we can use setParentTarget to get bubbling to work reliably with
custom events, but as Peter said, I don't think we want to set up
parentTarget's just-in-case.  Bubbling custom events is not a recommended
practice as was mentioned in some other thread recently.

Imagine if you had a Panel as a child of a larger Panel.  Bubbling a close
event from the inner Panel could easily cause the outer Panel's close
handler to also fire.

My 2 cents,
-Alex

On 7/21/17, 6:22 AM, "Peter Ent"  wrote:

>I needed events to bubble for the drag and drop work. While that was fine
>for the Flash Player, the FlexJS/Google/Browser event mix didn't work.
>Alex suggested I used setParentTarget on the event to work up the tree and
>then the event would be dispatched at each level, thus mimicking bubbling.
>I did this exclusively for drag events (see DragEvent class).
>
>Rather than putting that in as the solution for this, I took a simpler
>approach. 
>
>‹peter
>
>On 7/21/17, 2:35 AM, "Harbs"  wrote:
>
>>Bubbling does not work very well in FlexJS in general.
>>
>>When you can rely on native browser event bubbling, it usually works
>>okay, but custom events don¹t bubble.
>>
>>> On Jul 21, 2017, at 1:49 AM, Justin Mclean 
>>>wrote:
>>> 
>>> Hi,
>>> 
 The issue was that the TitleBar was dispatching "close" with
bubbles=true.
 This works fine on SWF but not on the HTML platform without some extra
 work. So I just had PanelView intercept the event and dispatch one
from
 its strand. 
>>> 
>>> Out of interest is this because of a missing cloneEvent method or that
>>>it wasn¹t listening on a parent of the item that dispatched the bubbling
>>>event or something else?
>>> 
>>> Thanks,
>>> Justin
>>
>



Re: [FlexJS] stopImmediatePropagation

2017-07-21 Thread Alex Harui
I think other goog code updates currentTarget as needed.  They are the
same when no capture or bubbling, IIRC.

-Alex

On 7/20/17, 11:52 PM, "Harbs"  wrote:

>Yes. I need to copy the code from BrowserEvent.
>
>Interestingly, goog.Events does not distinguish between target and
>currentTarget. That does not seem very useful:
>
>  * Target of the event.
>   * @type {Object|undefined}
>   */
>  this.target = opt_target;
>
>  /**
>   * Object that had the listener attached.
>   * @type {Object|undefined}
>   */
>  this.currentTarget = this.target;
>
>> On Jul 21, 2017, at 9:21 AM, piotrz  wrote:
>> 
>> Ahh Sorry I missed the point in his post. Do you see some solution ?
>> 
>> Piotr
>> 
>> 
>> 
>> -
>> Apache Flex PMC
>> piotrzarzyck...@gmail.com
>> --
>> View this message in context:
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>>ex-development.247.n4.nabble.com%2FFlexJS-stopImmediatePropagation-tp
>>63418p63479.html=02%7C01%7C%7C33b41ee272044f297c9208d4d005185f%7Cfa7
>>b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636362167683568915=xo66CMSg
>>ME%2BdFt7dg5qU6%2BYv7quJw6REm%2B5mKJbwpS0%3D=0
>> Sent from the Apache Flex Development mailing list archive at
>>Nabble.com.
>



Re: [FlexJS] String.match()

2017-07-21 Thread Alex Harui
My email totally mangled your post.  Anyway, if you think you've got code
that is equivalent to Flash's  String.match, that's good enough for now.
If folks find issues later we can improve on the utility function.

If you want to alter the compiler output, see how I handled Array.sortOn
in FunctionCallEmitter.java.  I think you can do something similar for
String.match and String.search.

Thanks,
-Alex

On 7/20/17, 2:28 PM, "Harbs"  wrote:

>No. We thought that the “?” found the string in Flash. It does not.
>
>trace("https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
>w.google.com%2Fsearch%3Fq%3Ddogs=02%7C01%7C%7Ce68f4223e52d48e8c03908d
>4cfb6524c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636361829356324151&
>sdata=voY1pLBiaj2u1GDu0YeKMipu%2FGRHwMWQzRRA0JCTkZc%3D=0".match("
>?"));
>trace("https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
>w.google.com%2Fsearch%3Fq%3Ddogs=02%7C01%7C%7Ce68f4223e52d48e8c03908d
>4cfb6524c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636361829356324151&
>sdata=voY1pLBiaj2u1GDu0YeKMipu%2FGRHwMWQzRRA0JCTkZc%3D=0".search(
>"?"));
>trace("https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
>w.google.com%2Fsearch%3Fq%3Ddogs=02%7C01%7C%7Ce68f4223e52d48e8c03908d
>4cfb6524c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636361829356324151&
>sdata=voY1pLBiaj2u1GDu0YeKMipu%2FGRHwMWQzRRA0JCTkZc%3D=0".indexOf
>("?"));
>
>outputs:
>
>null
>-1
>29
>
>> On Jul 21, 2017, at 12:00 AM, Alex Harui 
>>wrote:
>> 
>> I think I'm still confused.  My current thinking is that in Flash there
>> are strings you can pass in that are "invalid RegExp" that will still
>>find
>> matches in a string.  Isn't that what Yishay showed?  IOW, passing in
>>just
>> "?" in Flash will find question marks in a string but is an error in JS
>> because it isn't valid RegExp.
>> 
>> So, right now I think the utility function needs to catch the error and
>> either escape the string so it is valid RegExp and call match() or use
>> indexOf() and compute the same result.  It should not always return
>>null.
>> Then I think it would completely implement how it worked in Flash and
>>the
>> users won't have to figure out how to regex-ify the strings in the apps
>> they are porting.
>> 
>> My 2 cents,
>> -Alex
>> 
>> 
>> 
>> On 7/20/17, 12:55 PM, "Harbs" >> wrote:
>> 
>>> After all this discussion, I’m having second thoughts about this whole
>>> thing.
>>> 
>>> What’s the point of using an invalid RegExp that will not match
>>>anything?
>>> 
>>> I think the JS behavior makes more sense than the Flash behavior. If a
>>> RegExp is invalid, it should throw an error rather than never matching
>>> anything. The use of such a RegExp in the first place can only be
>>> described as a bug.
>>> 
>>> “Fixing” the JS behavior to match the Flash behavior is the wrong thing
>>> to do.
>>> 
 On Jul 20, 2017, at 10:34 PM, Harbs  wrote:
 
 new RegExp({})
 returns:
 /[object Object]/
 
 I think the wrapping that I did in the code I already committed is
 correct:
 
 try{return input.match(pattern);}
 catch (e:Error){return null;}
 
 If the try fails, that means the RegExp is an invalid expression and
 will not match anything in Flash. In that case, match should always
 return null and search should always return -1.
 
 I do think that warning developers against using strings is a good
 idea. Accepting any value and automatically converting it to RegExp
 seems like a poorly conceived idea to me...
 
> On Jul 20, 2017, at 9:48 PM, Alex Harui  >>
>wrote:
> 
> I'm confused.  Doesn't Yishay's example use syntax that Harbs claimed
> threw an error?
> 
> Anyway, I can believe the three steps Harbs listed are correct for JS
> since step 1 might just happen via implicit type coercion. I suppose
> someone could test it by seeing if JS handles "new RegExp({})";
> 
> But since there are differences between SWF and JS I want to first
>make
> sure we have agreement that the goal here is to be backward
>compatible
> with SWF if we can.  I don't think we should be requiring folks to
> modify
> existing passing of strings or getting the compiler to try to modify
> those
> strings if we can figure out how to get match() in JS to be
>equivalent
> to
> SWF's match().
> 
> So I think Herbs suggested wrapping in try catch like this, correct?
> 
> public function match(input:String, pattern:*):Array
> {
> COMPILE::SWF
> {
>   return input.match(pattern);
> }
> COMPILE::JS
> {
>   try
>   {
> return input.match(pattern);
>   }
>   catch (e:Error)
>   {
> 

Re: [FlexJS] findPopupHost issue

2017-07-21 Thread Peter Ent
I needed events to bubble for the drag and drop work. While that was fine
for the Flash Player, the FlexJS/Google/Browser event mix didn't work.
Alex suggested I used setParentTarget on the event to work up the tree and
then the event would be dispatched at each level, thus mimicking bubbling.
I did this exclusively for drag events (see DragEvent class).

Rather than putting that in as the solution for this, I took a simpler
approach. 

‹peter

On 7/21/17, 2:35 AM, "Harbs"  wrote:

>Bubbling does not work very well in FlexJS in general.
>
>When you can rely on native browser event bubbling, it usually works
>okay, but custom events don¹t bubble.
>
>> On Jul 21, 2017, at 1:49 AM, Justin Mclean 
>>wrote:
>> 
>> Hi,
>> 
>>> The issue was that the TitleBar was dispatching "close" with
>>>bubbles=true.
>>> This works fine on SWF but not on the HTML platform without some extra
>>> work. So I just had PanelView intercept the event and dispatch one from
>>> its strand. 
>> 
>> Out of interest is this because of a missing cloneEvent method or that
>>it wasn¹t listening on a parent of the item that dispatched the bubbling
>>event or something else?
>> 
>> Thanks,
>> Justin
>



Re: [FlexJS] stopImmediatePropagation

2017-07-21 Thread Harbs
Yes. I need to copy the code from BrowserEvent.

Interestingly, goog.Events does not distinguish between target and 
currentTarget. That does not seem very useful:

  * Target of the event.
   * @type {Object|undefined}
   */
  this.target = opt_target;

  /**
   * Object that had the listener attached.
   * @type {Object|undefined}
   */
  this.currentTarget = this.target;

> On Jul 21, 2017, at 9:21 AM, piotrz  wrote:
> 
> Ahh Sorry I missed the point in his post. Do you see some solution ?
> 
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/FlexJS-stopImmediatePropagation-tp63418p63479.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: git commit: [flex-asjs] [refs/heads/feature/browser-event] - Cleaned up typing of native events

2017-07-21 Thread Piotr Zarzycki
Thank you! :) <3

2017-07-21 8:41 GMT+02:00 :

> Repository: flex-asjs
> Updated Branches:
>   refs/heads/feature/browser-event 273526e94 -> 294c3d6ab
>
>
> Cleaned up typing of native events
>
>
> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/294c3d6a
> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/294c3d6a
> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/294c3d6a
>
> Branch: refs/heads/feature/browser-event
> Commit: 294c3d6ab3d1636ea3435e6c8ef548b0e845c08e
> Parents: 273526e
> Author: Harbs 
> Authored: Fri Jul 21 09:41:35 2017 +0300
> Committer: Harbs 
> Committed: Fri Jul 21 09:41:35 2017 +0300
>
> --
>  .../org/apache/flex/core/HTMLElementWrapper.as  |  7 ---
>  .../flex/events/utils/KeyboardEventConverter.as | 22 ++--
>  .../flex/events/utils/MouseEventConverter.as|  9 
>  3 files changed, 19 insertions(+), 19 deletions(-)
> --
>
>
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/
> 294c3d6a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/
> HTMLElementWrapper.as
> --
> diff --git 
> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as
> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/
> core/HTMLElementWrapper.as
> index 0324700..1260bef 100644
> --- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/
> core/HTMLElementWrapper.as
> +++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/
> core/HTMLElementWrapper.as
> @@ -68,13 +68,14 @@ package org.apache.flex.core
> static public function fireListenerOverride(listener:Object,
> eventObject:goog.events.BrowserEvent):Boolean
> {
>  var e:IBrowserEvent;
> -switch(eventObject["event_"]["constructor"]["name"])
> +var nativeEvent:Object = eventObject["event_"];
> +switch(nativeEvent.constructor.name)
>  {
>  case "KeyboardEvent":
> -e = KeyboardEventConverter.
> convert(eventObject["event_"]);
> +e = KeyboardEventConverter.convert(nativeEvent);
>  break;
>  case "MouseEvent":
> -e = MouseEventConverter.convert(
> eventObject["event_"]);
> +e = MouseEventConverter.convert(nativeEvent);
>  break;
>  default:
>  e = new org.apache.flex.events.BrowserEvent();
>
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/
> 294c3d6a/frameworks/projects/Core/src/main/flex/org/apache/
> flex/events/utils/KeyboardEventConverter.as
> --
> diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/
> events/utils/KeyboardEventConverter.as b/frameworks/projects/Core/
> src/main/flex/org/apache/flex/events/utils/KeyboardEventConverter.as
> index 1ee74b6..a5e8b6c 100644
> --- a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/
> KeyboardEventConverter.as
> +++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/
> KeyboardEventConverter.as
> @@ -68,20 +68,20 @@ package org.apache.flex.events.utils
>  *  @productversion FlexJS 0.8
>  */
> COMPILE::JS
> -   public static function convert(oldEvent:
> KeyboardEvent):org.apache.flex.events.KeyboardEvent
> +   public static function convert(nativeEvent:Object):
> KeyboardEvent
> {
> -   var type:String = oldEvent.type;
> -   var key:String = oldEvent.key;
> +   var type:String = nativeEvent["type"];
> +   var key:String = nativeEvent["key"];
> if (key == null)
> -   key = KeyConverter.convertCharCode(
> oldEvent['charCode']);
> -   var code:String = oldEvent.code;
> +   key = KeyConverter.convertCharCode(
> nativeEvent['charCode']);
> +   var code:String = nativeEvent["code"];
> if (code == null)
> -   code = KeyConverter.convertKeyCode(
> oldEvent['keyCode']);
> -   var newEvent:org.apache.flex.events.KeyboardEvent
> = new org.apache.flex.events.KeyboardEvent(type, key, code,
> oldEvent.shiftKey);
> -   newEvent.altKey = oldEvent.altKey;
> -   newEvent.ctrlKey = oldEvent.ctrlKey;
> -   newEvent.metaKey = oldEvent.metaKey;
> -   

Re: [FlexJS] stopImmediatePropagation

2017-07-21 Thread piotrz
Ahh Sorry I missed the point in his post. Do you see some solution ?

Piotr



-
Apache Flex PMC
piotrzarzyck...@gmail.com
--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/FlexJS-stopImmediatePropagation-tp63418p63479.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] findPopupHost issue

2017-07-21 Thread Harbs
Bubbling does not work very well in FlexJS in general.

When you can rely on native browser event bubbling, it usually works okay, but 
custom events don’t bubble.

> On Jul 21, 2017, at 1:49 AM, Justin Mclean  wrote:
> 
> Hi,
> 
>> The issue was that the TitleBar was dispatching "close" with bubbles=true.
>> This works fine on SWF but not on the HTML platform without some extra
>> work. So I just had PanelView intercept the event and dispatch one from
>> its strand. 
> 
> Out of interest is this because of a missing cloneEvent method or that it 
> wasn’t listening on a parent of the item that dispatched the bubbling event 
> or something else?
> 
> Thanks,
> Justin



Re: [FlexJS] stopImmediatePropagation

2017-07-21 Thread Harbs
Yes. That’s the same issue that Alex has pointed out.

> On Jul 21, 2017, at 8:44 AM, piotrz  wrote:
> 
> Hi Harbs,
> 
> I just take a look into your branch and unfortunately something is wrong.
> Our Tab component in MDL application stopped working. I see currentTarget is
> missing in MouseEvent:
> 
> 
>  
> 
> I would like to ask you to browser-event branch to feature/browser-event - I
> would like to have it in pipeline where Maven build whole framework. I will
> check whether with MDLExample is happening same, cause building locally I
> don't have tabs at all!
> 
> Thanks, Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/FlexJS-stopImmediatePropagation-tp63418p63476.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: [FlexJS] stopImmediatePropagation

2017-07-21 Thread piotrz
Hi Harbs,

I just take a look into your branch and unfortunately something is wrong.
Our Tab component in MDL application stopped working. I see currentTarget is
missing in MouseEvent:


 

I would like to ask you to browser-event branch to feature/browser-event - I
would like to have it in pipeline where Maven build whole framework. I will
check whether with MDLExample is happening same, cause building locally I
don't have tabs at all!

Thanks, Piotr



-
Apache Flex PMC
piotrzarzyck...@gmail.com
--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/FlexJS-stopImmediatePropagation-tp63418p63476.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.