This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25498 - Why all methods generated trusted event?
Summary: Why all methods generated trusted event?
Status: RESOLVED WONTFIX
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM View (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-29 12:50 UTC by Arkadiusz Michalski (Spirit)
Modified: 2014-04-30 05:23 UTC (History)
0 users

See Also:


Attachments

Description Arkadiusz Michalski (Spirit) 2014-04-29 12:50:02 UTC
Hi, firing trusted event in all method in CSSOM View Module is intentional?

Firstly, at this moment only Firefox and IE support Event.isTrusted, so you should test them. Secondly, at this moment this browser set isTrusted="true" for this methods, but it looks like a bug in the specification.

All specification (or at least most) defined that when we invoke method from script must be firing synthetic event (isTrusted="false"), but in CSSOM View Module all method requires a trusted event.

Check definition for:
- Window.scroll()
- Window.scrollTo()
- Window.scrollBy()
- Element.scrollTop (when setting)
- Element.scrollLeft(when setting)
- and probably in more cases (I check only above)

If for some reason must be trusted then OK, but it looks weird.
Comment 1 Arkadiusz Michalski (Spirit) 2014-04-29 21:34:14 UTC
It seems that I misunderstood subject, only click() has isTrusted="false", other events (even if they are the result of the method call from inside the script) have isTrusted="true". 

Hmm, so now we can't detect that some event are derived from methods inside the script (not user interaction), what looks like a slight limitation for developers:

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

In summary, if this bug is not needed please close it.
Comment 2 Simon Pieters 2014-04-30 05:23:45 UTC
It seems they are trusted in Gecko (didn't check IE). In general, events are trusted, except those dispatched with dispatchEvent. Please reopen if this situation changes in bug 25504.