Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need double TAB to get focus #98

Closed
andriasmelianus opened this issue Mar 29, 2019 · 7 comments
Closed

Need double TAB to get focus #98

andriasmelianus opened this issue Mar 29, 2019 · 7 comments
Labels
bug Something isn't working released

Comments

@andriasmelianus
Copy link

Hi, thanks for this really nice component!
I found a little unexpected behavior here when I want to focus to this component from previous input control with Tab key. I need to stroke Tab key twice to focus and start typing on this component.
ezgif-1-27bc62878350
I have tested it on Chromium 73 and Firefox 66 on Ubuntu 16.04.
Thanks.

@iliyaZelenko
Copy link
Owner

Hi, thank you very much for finding a bug, today a new version will be released where this will be fixed. I'll let you know when this happens.

I see your fields may have a green color. If there are no errors, I can do this for you.

@iliyaZelenko iliyaZelenko added the bug Something isn't working label Mar 29, 2019
iliyaZelenko pushed a commit that referenced this issue Mar 29, 2019
`input-before`, `input-start`, `input-end`, `input-after`

re #98
iliyaZelenko pushed a commit that referenced this issue Mar 29, 2019
# [2.10.0](v2.9.0...v2.10.0) (2019-03-29)

### Bug Fixes

* **component:** fix circular call for methods ([03053bd](03053bd))
* **component:** fix tab navigation ([a03694b](a03694b)), closes [#98](#98)
* **component:** when you clear the elements, the selected element is not cleared ([b184378](b184378)), closes [#42](#42)

### Features

* **props:** added inputForTextClass prop ([ddb2c32](ddb2c32)), closes [#90](#90)
* **slots:** added 4 new slots for input ([3f892e0](3f892e0)), closes [#98](#98)
@iliyaZelenko
Copy link
Owner

🎉 This issue has been resolved in version 2.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@iliyaZelenko
Copy link
Owner

iliyaZelenko commented Mar 29, 2019

I think I fixed the problem with the navigation through the Tab, but I need your confirmation.

I also added a new successful option that adds success styles. I also added 4 new slots (input-before, input-start, input-end, input-after) that allow you to place your content in different parts of the component. Using slot input-end, you can put a tick as you have in the screenshot.

I wrote a sample code that works for me (note: the new slot syntax is used):

Demo on Codesanbox.

<cool-select
  v-model="selected"
  :items="items"
  :error-message="errorMessage"
  :successful="!!(!errorMessage && selected)"
  placeholder="Select name"
>
  <template slot="input-end">
    <span
      v-if="selected || errorMessage"
      style="margin-right: 8px;"
      >
      {{ errorMessage ? '❌' : '✔️' }}
    </span>
  </template>
</cool-select>

Waiting for your reply.

@iliyaZelenko
Copy link
Owner

@andriasmelianus I released a hotfix (2.10.1) where I fixed a small bug, make sure you install this version.

You can also write your suggestions for improving this component, I will consider them.

@andriasmelianus
Copy link
Author

Hi @iliyaZelenko thank you so much for the extra effort & great features!
But I will try those later, for now, lets focus on this little bug first related to the Tab key.

I have install 2.10.1, but the component refuse to focus and skipping to the next input control instead.
Here is the recorded behavior when I stroke Tab and Shift + Tab
ezgif-4-e436b2e15298

I also have checked this:

Demo on Codesanbox.

It works fine there and I realize, that this problem occurs when we combine the component with native or other input control (e.g. <b-form-input> from BootstrapVue) in the same form.

I hope you have the solution or alternative ways to solve this problem.

iliyaZelenko pushed a commit that referenced this issue Mar 29, 2019
## [2.10.2](v2.10.1...v2.10.2) (2019-03-29)

### Bug Fixes

* **component:** set tabindex to 0 instead of 1 ([ebe593e](ebe593e)), closes [#98](#98)
@iliyaZelenko
Copy link
Owner

This seems to be completely fixed in version 2.10.2. I created for you a demonstration project where you can see this.

Thank you for finding this error and sorry for seeing it in your project.

@andriasmelianus
Copy link
Author

That's awesome! 🤝 👏
The component is working perfectly now.
🔝 Lets see this repo crawls to the top soon! 😃

rin4573281133639 added a commit to rin4573281133639/iliyaZelenko9 that referenced this issue Feb 5, 2022
# [2.10.0](iliyaZelenko/vue-cool-select@v2.9.0...v2.10.0) (2019-03-29)

### Bug Fixes

* **component:** fix circular call for methods ([03053bd](iliyaZelenko/vue-cool-select@03053bd))
* **component:** fix tab navigation ([a03694b](iliyaZelenko/vue-cool-select@a03694b)), closes [#98](iliyaZelenko/vue-cool-select#98)
* **component:** when you clear the elements, the selected element is not cleared ([b184378](iliyaZelenko/vue-cool-select@b184378)), closes [#42](iliyaZelenko/vue-cool-select#42)

### Features

* **props:** added inputForTextClass prop ([ddb2c32](iliyaZelenko/vue-cool-select@ddb2c32)), closes [#90](iliyaZelenko/vue-cool-select#90)
* **slots:** added 4 new slots for input ([3f892e0](iliyaZelenko/vue-cool-select@3f892e0)), closes [#98](iliyaZelenko/vue-cool-select#98)
rin4573281133639 added a commit to rin4573281133639/iliyaZelenko9 that referenced this issue Feb 5, 2022
## [2.10.2](iliyaZelenko/vue-cool-select@v2.10.1...v2.10.2) (2019-03-29)

### Bug Fixes

* **component:** set tabindex to 0 instead of 1 ([ebe593e](iliyaZelenko/vue-cool-select@ebe593e)), closes [#98](iliyaZelenko/vue-cool-select#98)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

2 participants