(In reply to Ksenia Berezina [:ksenia] from comment #10) > Created attachment 9249866 [details] > gmail.html > > I've attached a reduced test case. In the onclick handler a new `<a>` element is created and a new event is dispatched on this element with `createEvent, initMouseEvent, dispatchEvent`. The original event has `preventDefault()`. Looks like this way of dispatching events in combination with Command key is not working in Firefox, but works in Chrome. It is because JSWindowActor default doesn't listen to the untrusted event and `ClickHandlerChild` doesn't handle the untrusted event, either, see https://searchfox.org/mozilla-central/rev/a48e21143960b383004afa9ff9411c5cf6d5a958/browser/actors/ClickHandlerChild.jsm#35. We behave the same on all platforms (Window, Mac, and Linux). We could "fix" this to make command+click work in Gmail by allowing `ClickHandlerChild` to handle the untrusted click event. However, it doesn't work on Mac only, I wonder if Gmail dispatches a new click event for Mac only, not sure if it is a bug of Gmail or they behave differently on Mac for some purpose. Hi Ksenia, could you help to check this with Gmail? Thanks!
Bug 1739929 Comment 14 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Ksenia Berezina [:ksenia] from comment #10) > Created attachment 9249866 [details] > gmail.html > > I've attached a reduced test case. In the onclick handler a new `<a>` element is created and a new event is dispatched on this element with `createEvent, initMouseEvent, dispatchEvent`. The original event has `preventDefault()`. Looks like this way of dispatching events in combination with Command key is not working in Firefox, but works in Chrome. It is because JSWindowActor default doesn't listen to the untrusted event and `ClickHandlerChild` doesn't handle the untrusted event, either, see https://searchfox.org/mozilla-central/rev/a48e21143960b383004afa9ff9411c5cf6d5a958/browser/actors/ClickHandlerChild.jsm#35. We behave the same on all platforms (Window, Mac, and Linux). We could "fix" this to make command+click work in Gmail by allowing `ClickHandlerChild` to handle the untrusted click event. However, command+click in Gmail doesn't work on Mac only, I wonder if Gmail dispatches a new click event for Mac only, not sure if it is a bug of Gmail or they behave differently on Mac for some purpose. Hi Ksenia, could you help to check this with Gmail? Thanks!
(In reply to Ksenia Berezina [:ksenia] from comment #10) > Created attachment 9249866 [details] > gmail.html > > I've attached a reduced test case. In the onclick handler a new `<a>` element is created and a new event is dispatched on this element with `createEvent, initMouseEvent, dispatchEvent`. The original event has `preventDefault()`. Looks like this way of dispatching events in combination with Command key is not working in Firefox, but works in Chrome. It is because JSWindowActor doesn't listen to the untrusted event by default and `ClickHandlerChild` doesn't handle the untrusted event, either, see https://searchfox.org/mozilla-central/rev/a48e21143960b383004afa9ff9411c5cf6d5a958/browser/actors/ClickHandlerChild.jsm#35. We behave the same on all platforms (Window, Mac, and Linux). We could "fix" this to make command+click work in Gmail by allowing `ClickHandlerChild` to handle the untrusted click event. However, command+click in Gmail doesn't work on Mac only, I wonder if Gmail dispatches a new click event for Mac only, not sure if it is a bug of Gmail or they behave differently on Mac for some purpose. Hi Ksenia, could you help to check this with Gmail? Thanks!