ant-design/components/input
Jason Miller 36a5485870
fix: Avoid mutating Event properties that are supposed to be getters (#33536)
* Avoid mutating Event properties that are supposed to be getters

React's synthetic Event objects have mutable `target` and `currentTarget` properties. These are an incorrect emulation of the corresponding DOM Event properties, which are _getters_ and cannot be assigned-to. AntD's input handling attempts to assign to these getters, which fails in Preact because it uses native Event objects. The solution is to replace the simple property assignments with property definitions, which is likely smaller anyway due to the existing use of `Object.create()` to construct a prototypal facade of Event objects.

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: afc163 <afc163@gmail.com>
2022-01-04 22:41:12 +08:00
..
__tests__ fix: input not support number value (#33462) 2021-12-29 11:32:49 +08:00
demo test: Update snapshot 2021-12-01 22:52:49 +08:00
style test: Update snapshot 2021-12-01 22:52:49 +08:00
ClearableLabeledInput.tsx feat: input number support prefix (#32600) 2021-10-30 22:25:12 +08:00
Group.tsx refactor: clean up some deprecated APIs (#24881) 2020-06-10 11:12:31 +08:00
index.en-US.md docs: fix version error (#33443) 2021-12-28 13:29:43 +08:00
index.tsx feat: Add Input.Password 2018-12-05 19:46:06 +08:00
index.zh-CN.md docs: fix version error (#33443) 2021-12-28 13:29:43 +08:00
Input.tsx fix: Avoid mutating Event properties that are supposed to be getters (#33536) 2022-01-04 22:41:12 +08:00
Password.tsx chore: replace omit (#28846) 2021-01-13 21:00:30 +08:00
Search.tsx fix: Input.Search enterButton don't trigger click event (#32999) 2021-11-24 13:23:51 +08:00
TextArea.tsx fix: Revert "fix: TextArea missing maxLength attr." (#33312) 2021-12-15 21:36:36 +08:00
utils.ts fix: circular dependencies in Modal & Input (#31817) 2021-08-17 16:22:42 +08:00