Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api.InputEvent.InputEvent - Safari 14.1.2 does not support initData in InputEvent constructor correctly #11994

Closed
ZhangYiJiang opened this issue Aug 13, 2021 · 1 comment · Fixed by #11995
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API

Comments

@ZhangYiJiang
Copy link
Contributor

ZhangYiJiang commented Aug 13, 2021

Browser: Safari 14.1.2
OS: macOS Catalina 10.15.7

What information was incorrect, unhelpful, or incomplete?

InputEvent() constructor's compatibility chart suggests Safari is fully compliant, but it does not correctly support initData. This makes it difficult to use InputEvent constructor since the properties defined in initData are immutable (readonly) on the actual event object, which means the constructor cannot be used.

What did you expect to see?

A note warning about Safari not supporting initData correctly

Did you test this? If so, how?

Webkit bug tracker: https://bugs.webkit.org/show_bug.cgi?id=170416

In Safari's console -

> e = new InputEvent('beforeinput', { inputType: 'insertText' }) 
< InputEvent {isTrusted: false, inputType: "", data: null, dataTransfer: null, getTargetRanges: function, …}
> e.inputType
< ""

Compared to in Firefox

> e = new InputEvent('beforeinput', { inputType: 'insertText' })
< beforeinput { target: null, isTrusted: false, isComposing: false, inputType: "insertText", detail: 0, layerX: 0, layerY: 0, which: 0, rangeOffset: 0, SCROLL_PAGE_UP: -32768, … }
> e.inputType
< "insertText"
MDN page report details
ZhangYiJiang added a commit to ZhangYiJiang/browser-compat-data that referenced this issue Aug 13, 2021
Add partial implementation notes for Safari InputEvent()
@queengooborg queengooborg added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Aug 13, 2021
@gsnedders
Copy link
Contributor

#7287 is relevant here; WebKit has:

dictionary InputEventInit : UIEventInit {
    DOMString? data = null;
};

As such the rest of the dictionary is unsupported.

ddbeck pushed a commit that referenced this issue Aug 23, 2021
#11995)

* Fixes #11994

Add partial implementation notes for Safari InputEvent()

* Fix lint issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
3 participants