darrenjennings / vue-autosuggest

🔍 Vue autosuggest component.
https://darrenjennings.github.io/vue-autosuggest
MIT License
621 stars 91 forks source link

Remove preventDefault() when the popup closed #154

Closed Sielc closed 4 years ago

Sielc commented 5 years ago

Fix for #153, it's tested and works

codecov-io commented 5 years ago

Codecov Report

Merging #154 into master will decrease coverage by 0.62%. The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #154      +/-   ##
==========================================
- Coverage    82.6%   81.98%   -0.63%     
==========================================
  Files           1        1              
  Lines         161      161              
  Branches       45       46       +1     
==========================================
- Hits          133      132       -1     
  Misses         12       12              
- Partials       16       17       +1
Impacted Files Coverage Δ
src/Autosuggest.vue 81.98% <77.77%> (-0.63%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update de19925...dece278. Read the comment docs.

darrenjennings commented 5 years ago

Thanks for the PR! The code coverage CI failure is fine, I will dismiss, but I'm more concerned with having a test. Do you feel up to writing one?

Sielc commented 5 years ago

No, I don't understand what exactly you want to cover with a test and how to do it.

Sielc commented 5 years ago

Did you checked changes and understood why preventDefault() works correct now? Will you merge this PR?

darrenjennings commented 5 years ago

Yea needs tests, so will get to that when I can.

Sielc commented 4 years ago

hey, how are you?)

darrenjennings commented 4 years ago

@Sielc i had to make some tweaks to your code, but went ahead and bundled this into PR #164 in favor of releasing it without back and forth of PR review. Thanks for the contribution!

Sielc commented 4 years ago

Hi, @darrenjennings I checked your code and saw changes helping our problem. Great! Thank you. Just to be sure, did you checked that 'enter' key doesn't preventDefault() when the popup is closed?

As you can see in my diff, I added a check for key 13

case 13: // Enter
     if (this.isOpen) {
           e.preventDefault();

But you didn't

darrenjennings commented 4 years ago

@Sielc I haven't published a new version yet, I'll be sure to get that in for you.

darrenjennings commented 4 years ago

@Sielc try vue-autosuggest@2.0.4-beta.0 and let me know if this solves your issue.

Sielc commented 4 years ago

@Sielc try vue-autosuggest@2.0.4-beta.0 and let me know if this solves your issue.

I tried and it didn't worked. Will investigate 'why?' later