SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.5k stars 260 forks source link

[input]: input with type number on handle fails when using keyboard's arrows #9785

Open rvsia opened 1 week ago

rvsia commented 1 week ago

Bug Description

When using Input.Number and increasing/decreasing numbers using keyboard arrows, the onHandle callback fails

Affected Component

input

Expected Behaviour

No fail error should shown and on handle should work

Isolated Example

https://sap.github.io/ui5-webcomponents/play/#eyJpbmRleC5odG1sIjp7Im5hbWUiOiJpbmRleC5odG1sIiwiY29udGVudCI6IjwhLS0gcGxheWdyb3VuZC1mb2xkIC0tPlxuPCFET0NUWVBFIGh0bWw-XG48aHRtbCBsYW5nPVwiZW5cIj5cblxuXG5cbjxoZWFkPlxuICAgIFxuICAgIDxzdHlsZT5cbiAgICAgICo6bm90KDpkZWZpbmVkKSB7XG4gICAgICAgIGRpc3BsYXk6IG5vbmU7XG4gICAgICB9XG4gICAgPC9zdHlsZT5cblxuICAgIFxuICAgIDxzdHlsZT5cbiAgICAgICo6bm90KDpkZWZpbmVkKSB7XG4gICAgICAgIGRpc3BsYXk6IG5vbmU7XG4gICAgICB9XG4gICAgPC9zdHlsZT5cblxuICAgIDxtZXRhIGNoYXJzZXQ9XCJVVEYtOFwiPlxuICAgIDxtZXRhIG5hbWU9XCJ2aWV3cG9ydFwiIGNvbnRlbnQ9XCJ3aWR0aD1kZXZpY2Utd2lkdGgsIGluaXRpYWwtc2NhbGU9MS4wXCI-XG4gICAgPHRpdGxlPlNhbXBsZTwvdGl0bGU-XG48L2hlYWQ-XG5cbjxib2R5IHN0eWxlPVwiYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tc2FwQmFja2dyb3VuZENvbG9yKVwiPlxuICAgIDwhLS0gcGxheWdyb3VuZC1mb2xkLWVuZCAtLT5cblxuICAgIDx1aTUtaW5wdXQgdmFsdWU9XCJJbnB1dFwiIHR5cGU9XCJOdW1iZXJcIj48L3VpNS1pbnB1dD5cbiAgICA8IS0tIHBsYXlncm91bmQtZm9sZCAtLT5cbiAgICA8c2NyaXB0IHR5cGU9XCJtb2R1bGVcIiBzcmM9XCJtYWluLmpzXCI-PC9zY3JpcHQ-XG48L2JvZHk-XG5cbjwvaHRtbD5cbjwhLS0gcGxheWdyb3VuZC1mb2xkLWVuZCAtLT5cbiJ9LCJtYWluLmpzIjp7Im5hbWUiOiJtYWluLmpzIiwiY29udGVudCI6Ii8qIHBsYXlncm91bmQtaGlkZSAqL1xuaW1wb3J0IFwiLi9wbGF5Z3JvdW5kLXN1cHBvcnQuanNcIjtcbi8qIHBsYXlncm91bmQtaGlkZS1lbmQgKi9cbmltcG9ydCBcIkB1aTUvd2ViY29tcG9uZW50cy9kaXN0L0lucHV0LmpzXCI7In19

Steps to Reproduce

  1. increase/decrease number using keyboard's arrows
  2. see error in the console log

Log Output, Stack Trace or Screenshots

Kapture 2024-09-02 at 10 47 32

Input.js:588  Uncaught TypeError: Cannot read properties of undefined (reading 'inputType')
    at Input._handleInput (Input.js:588:25)
    at z.handleEvent (lit-html.js:6:7169)

Priority

High

UI5 Web Components Version

1.24.6 (but it also affects playground running the latest)

Browser

Edge

Operating System

MacOS

Additional Context

No response

Organization

SAP Signavio

Declaration

kskondov commented 1 week ago

Hello @rvsia,

The issue was already fixed in the newest version with #9616 . It is best if you can use the latest version, if this is not possible then @SAP/ui5-webcomponents-topic-rl, Can you please take a look and consider a downport to version 1 for this issue?

Best Regards, Konstantin

rvsia commented 1 week ago

@kskondov

Nightly version works well https://sap.github.io/ui5-webcomponents/nightly/play/#eyJpbmRleC5odG1sIjp7Im5hbWUiOiJpbmRleC5odG1sIiwiY29udGVudCI6IjwhLS0gcGxheWdyb3VuZC1mb2xkIC0tPlxuPCFET0NUWVBFIGh0bWw-XG48aHRtbCBsYW5nPVwiZW5cIj5cblxuXG48aGVhZD5cbiAgICBcbiAgICA8c3R5bGU-XG4gICAgICAqOm5vdCg6ZGVmaW5lZCkge1xuICAgICAgICBkaXNwbGF5OiBub25lO1xuICAgICAgfVxuICAgIDwvc3R5bGU-XG5cbiAgICA8bWV0YSBjaGFyc2V0PVwiVVRGLThcIj5cbiAgICA8bWV0YSBuYW1lPVwidmlld3BvcnRcIiBjb250ZW50PVwid2lkdGg9ZGV2aWNlLXdpZHRoLCBpbml0aWFsLXNjYWxlPTEuMFwiPlxuICAgIDx0aXRsZT5TYW1wbGU8L3RpdGxlPlxuPC9oZWFkPlxuXG48Ym9keSBzdHlsZT1cImJhY2tncm91bmQtY29sb3I6IHZhcigtLXNhcEJhY2tncm91bmRDb2xvcilcIj5cbiAgICA8IS0tIHBsYXlncm91bmQtZm9sZC1lbmQgLS0-XG5cbiAgICA8dWk1LWlucHV0IHZhbHVlPVwiSW5wdXRcIj48L3VpNS1pbnB1dD5cbiAgICA8IS0tIHBsYXlncm91bmQtZm9sZCAtLT5cbiAgICA8c2NyaXB0IHR5cGU9XCJtb2R1bGVcIiBzcmM9XCJtYWluLmpzXCI-PC9zY3JpcHQ-XG48L2JvZHk-XG5cbjwvaHRtbD5cbjwhLS0gcGxheWdyb3VuZC1mb2xkLWVuZCAtLT5cbiJ9LCJtYWluLmpzIjp7Im5hbWUiOiJtYWluLmpzIiwiY29udGVudCI6Ii8qIHBsYXlncm91bmQtaGlkZSAqL1xuaW1wb3J0IFwiLi9wbGF5Z3JvdW5kLXN1cHBvcnQuanNcIjtcbi8qIHBsYXlncm91bmQtaGlkZS1lbmQgKi9cbmltcG9ydCBcIkB1aTUvd2ViY29tcG9uZW50cy9kaXN0L0lucHV0LmpzXCI7In19

nnaydenow commented 1 week ago

Hi @rvsia,

Version 2.2.0 was release earlier today and the fix might is available for version 2.

Hi @SAP/ui5-webcomponents-topic-rl,

Probably the following https://github.com/SAP/ui5-webcomponents/commit/16c2e5db1c523c950da339e575f275ee7be4a009 commit should be downported to version 1.24 to fix the issue.

Regards, Nayden