Carlos,

The convention in framework code is to not use strict equality. The rationale 
in JS does not translate very well to AS code IMO. We discussed this some years 
back.

Not to be pedantic… ;-)

Harbs

> On Jun 14, 2020, at 5:22 PM, [email protected] wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> carlosrovira pushed a commit to branch develop
> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> 
> 
> The following commit(s) were added to refs/heads/develop by this push:
>     new c5a8f09  core-isfocused: better stricter
> c5a8f09 is described below
> 
> commit c5a8f09d18fc4b4b629bf0def2f38784c1a01e4b
> Author: Carlos Rovira <[email protected]>
> AuthorDate: Sun Jun 14 16:21:53 2020 +0200
> 
>    core-isfocused: better stricter
> ---
> .../Core/src/main/royale/org/apache/royale/utils/html/isFocused.as      | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git 
> a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/html/isFocused.as
>  
> b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/html/isFocused.as
> index 3e4b004..c9e0412 100644
> --- 
> a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/html/isFocused.as
> +++ 
> b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/html/isFocused.as
> @@ -26,6 +26,6 @@ package org.apache.royale.utils.html
>       COMPILE::JS
>       public function isFocused(host:ElementWrapper):Boolean
>       {
> -             return host.element == document.activeElement;
> +             return host.element === document.activeElement;
>       }
> }
> 

Reply via email to