[Bug 25365] About trusted="false" in two event orders

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25365

--- Comment #6 from spiritRKS1910 <crimsteam@gmail.com> ---
Right, still exist sth like element.click()

http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#dom-click

which generate untrusted event but trigger default action. So description in
"3.4 Trusted events" is correct.

Small test:
<button id="btn">Move focus to this button and press Enter/Space</button>
<p style="color: blue;">Detailed information for the captured events:</p>
<p id="info"><p/>

<script>

    var btn= document.getElementById("btn");
    var info = document.getElementById("info");

    function readInfo(e){

        var data = "Interface: " + e
            + "<br>" + "e.type: " + e.type
            + "<br>" + "e.target: " + e.target
            + "<br>" + "e.isTrusted: " + e.isTrusted + "<br><br>";

        info.innerHTML = info.innerHTML + data;

    }

    btn.addEventListener("keydown", readInfo)
    btn.addEventListener("DOMActivate", readInfo)
    btn.addEventListener("click", readInfo)

    btn.click();

</script>

But, in IE11 above return e.isTrusted="true" (incorrect with HTML5), when
Firefox has "false".

Event orders in cited examples sholud inform if it represented trusted (like
manual key press) or untrusted case (call method from script) and everything
would be obvious.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Sunday, 27 April 2014 23:06:39 UTC