ngx-chips icon indicating copy to clipboard operation
ngx-chips copied to clipboard

The focus event is not triggered when the input is selected by tab or shift + tab key

Open carlosa-suarez opened this issue 6 years ago • 1 comments

I'm submitting a ...

[ ] bug report
[x ] support request/question

Current behavior The field trigger the onFocus/onBlur events when is clicked, but it doesn't when is focus/blur using tab key.

Expected behavior

The tag input should trigger the onFocus/onBlur events when is selected by tab key or focus/blur events should be enabled to avoid blurring when a tag is selected by tab.

Minimal reproduction of the problem with instructions (if applicable)

  1. go to https://angular-mfppay.stackblitz.io/
  2. open the console to see the events fired
  3. look for the "Tags within a form element with outputs" tag (this input triggers console logs per event)
  4. Place the cursor on the previous input and then press the "tab" key
  5. Same with the next input when the "shift" + "tab" keys are pressed

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

Angular CLI: 1.6.1 Node: 8.9.4 typescript: 2.4.0 webpack: 3.10.0

Angular version:

Angular: 4.4.7

ngx-chips version:

Browser: Chrome Version 61.0.3163.100 (Official Build) (64-bit) OS: linux ubuntu 1.16 x64

carlosa-suarez avatar Aug 23 '18 20:08 carlosa-suarez

I am also using .focus() of JS to focus the tag-input, it is not working

poddarkhushbu07 avatar Sep 14 '20 07:09 poddarkhushbu07