Closed InfiniteXyy closed 2 months ago
Hello @InfiniteXyy,
The reason the browser suggestions are turned off is to follows the design specs - the input to compete its value from the input suggestions and value state popovers. This is done via autocomplete="off" set on the native input.
This issue has been discussed and for now the solution is to disable the autocomplete for the native input. Disabling of the autocomplete will be available in a future version patch of the web components, so there won't be this console error.
Kind regards, Nikoleta Terzieva
Bug Description
onInput/onChange is not triggered when using browser autofill to fill an InputField, and an error was throwed TypeError: Cannot read properties of undefined (reading 'inputType')
I found this nullPointer issue could be easier solved by adding a non-empty check, and I think it won't cause any side effects.
(This
e.detail
is undefined when using autocomplete)https://github.com/SAP/ui5-webcomponents/blob/54944a8455be0cd2e6c4c9255887eaa3d5954717/packages/main/src/Input.ts#L1010-L1015
BTW: There is already an issue about this behaviour, https://github.com/SAP/ui5-webcomponents/issues/8706 and it was closed by removing the autocompletion feature out.
But I personally think that having the autocomplete feature can greatly enhance the user experience and don't want to kill it.
Affected Component
No response
Expected Behaviour
The onInput should work when using browser autocomplete
Isolated Example
https://github.com/InfiniteXyy/ui5-input-bug-reproduce
Steps to Reproduce
yarn && yarn dev
yarn patch && yarn dev
Log Output, Stack Trace or Screenshots
Priority
None
UI5 Web Components Version
1.24.6
Browser
Chrome, Safari
Operating System
macOS 14.5
Additional Context
I am using
@ui5/webcomponents-react
to reproduce the issue., This library is just a wrapper for web components, and the bugs encountered are all the same.Organization
No response
Declaration