openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Language / Special Characters in InputBase

Open timostark opened this issue 8 years ago • 5 comments

OpenUI5 version: ALL Browser/version (+device/version): IE10 (and IE11) Any other tested browsers/devices(OK/FAIL): All others are OK URL (minimal example if possible): Any Input enabled field

Steps to reproduce the problem:

  1. Create an event on an input based control (InputBase.js)
  2. Events are not triggered correctly for special characters (e.g. ß/ä/ö/ü)

Reason for the issue: The following code is not consisdering ASCII special characters ( https://github.com/SAP/openui5/blob/master/src/sap.m/src/sap/m/InputBase.js ) image

/^[\x00-\x7F]$/.test("ü") --> false /^[\x00-\x7F]$/.test("a") --> true

Therefore events are marked as invalid incorrectly.

Example after entering "ß" and pressing Enter on https://openui5nightly.hana.ondemand.com/#/sample/sap.m.sample.InputAssisted/preview image

timostark avatar Mar 15 '18 11:03 timostark

Hello timostark,

Thank you for sharing this finding. I've created an internal incident 1870052575. The status of the issue will be updated here in GitHub.

Regards, Bozhko

bozhkotodorov avatar Mar 15 '18 11:03 bozhkotodorov

Hello @timostark,

Thank you for your ticket! This is done becouse when the input event is buggy the input event is marked as "invalid". * - IE10+ fires the input event when an input field with a native placeholder is focused. * - IE11 fires input event from read-only fields. * - IE11 fires input event after rendering when value contains an accented character * - IE11 fires input event whenever placeholder attribute is changed The logic in the rest of the controls takes care of othere cases. Thsi is how the control shuld work.

Best Regards, Gergana

GerganaKremenska avatar Mar 21 '18 12:03 GerganaKremenska

Hi Gergana,

Than the combobox is not behaving correctly. The oninput event of the combobox is ignoring invalid events. An event triggered by german special characters (e.g. ß, ö, ü) is marked as invalid, even though that is a totally valid character. Basically this means, that the Combo-Box is behaving differently in IE11 when entering an accented character, compared to when entering a normal character.

image

Regards, Timo

timostark avatar Mar 21 '18 12:03 timostark

Hi @GerganaKremenska , @bozhkotodorov ,

Can you please comment? I've created a plnkr for that - Here you can clearly see the different behavior of chrome and IE: http://plnkr.co/edit/SffBJTtVS35ERsXZfYeD?p=preview

Chrome: Select "TestÄ" image --> select text and press backspace image --> selection changed to null image

IE: Select TestÄ image Select Text and clear image --> Selection is NOT reset to null. That is also not happening when trying to confirm PS: Please note that IE behaves correctly for all items not containing special characters.

Thanks, Timo

timostark avatar Apr 09 '18 07:04 timostark

@timostark the update was posted after the closure :) The case is in the dev team and they will post an update here

stephania87 avatar Apr 11 '18 13:04 stephania87