Gbuomprisco / ngx-chips

Tag Input component for Angular
MIT License
902 stars 359 forks source link

Safari: Wrong behaviour of non-readable text related keystrokes #861

Open lagopus1990 opened 5 years ago

lagopus1990 commented 5 years ago

PLEASE MAKE SURE THAT:

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] support request/question

Notice: feature requests will be ignored, submit a PR if you'd like

Current behavior

Bug in Safari: None-readable character keystrokes do not trigger expected behaviour. These consist of standard keystrokes that are text related: select-all (Command+a shortcut), arrows, go to start (control+a) are all cleared upon release and go to end of the input field. Another problem that originates from same problem is when you select all text in an input field and press backspace: only last character is deleted.

Expected behavior

Normal behaviour of the standard keystrokes in text-type input field.

The problems originates from the propagation of keystrokes starting in tag-input-form.template.html They seem to conflict with the form directive itself.

I do not need all functionality of this package at this point, so I was able to work around the problem by commenting out the (keyDown) and (keyUp) triggers in the above mentioned template file. The ngSubmit triggering the submit handles most of what I need. So I'm good to go.

Minimal reproduction of the problem with instructions (if applicable)

The live demo has this problem too.

What do you use to build your app?. Please specify the version

angular-cli 6.0.8

Angular version:

6.0.4

ngx-chips version:

2.0.0-beta.0

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Safari Version 12.0 (13606.2.11)