Skip to content

fix(dropdown): Menu focusout close handling #2252

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

Merged

Conversation

jacobmllr95
Copy link
Member

Description of Pull Request:

This is a follow-up PR to #2251 and addresses the real issue for .dropdown-menu's focusout handling.

PR checklist:

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Enhancement to an existing feature
  • ARIA accessibility
  • Documentation update
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact:

The PR fulfills these requirements:

  • It's submitted to the dev branch, not the master branch
  • When resolving a specific issue, it's referenced in the PR's title (i.e. fixes #xxxx[,#xxxx], where "xxxx" is the issue number)
  • The PR should address only one issue or feature. If adding multiple features or fixing a bug and adding a new feature, break them into separate PRs if at all possible.
  • PR titles should following the Conventional Commits naming convention (i.e. "fix(alert): not alerting during SSR render", "docs(badge): Updated pill examples, fix typos", "chore: fix typo in docs", etc). This is very important, as the CHANGELOG is generated from these messages.

If new features/enhancement/fixes are added or changed:

  • Includes documentation updates (including updating the component's package.json for slot and event changes)
  • New/updated tests are included and passing (if required)
  • Existing test suites are passing
  • The changes have not impacted the functionality of other components or directives
  • ARIA Accessibility has been taken into consideration (does it affect screen reader users or keyboard only users? clickable items should be in the tab index, etc)

If adding a new feature, or changing the functionality of an existing feature, the PR's description above includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

@codecov
Copy link

codecov bot commented Dec 7, 2018

Codecov Report

Merging #2252 into dev will decrease coverage by 0.36%.
The diff coverage is 32.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #2252      +/-   ##
==========================================
- Coverage   65.98%   65.61%   -0.37%     
==========================================
  Files         158      160       +2     
  Lines        3063     3100      +37     
  Branches      846      859      +13     
==========================================
+ Hits         2021     2034      +13     
- Misses        761      778      +17     
- Partials      281      288       +7
Impacted Files Coverage Δ
src/components/dropdown/dropdown.js 100% <ø> (ø) ⬆️
src/components/nav/nav-item-dropdown.js 85.71% <ø> (ø) ⬆️
src/mixins/dropdown.js 3.66% <0%> (-0.26%) ⬇️
src/components/link/link.js 70.37% <100%> (ø) ⬆️
src/mixins/focus-in.js 38.46% <38.46%> (ø)
src/mixins/click-out.js 47.05% <47.05%> (ø)

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 e620e07...1989544. Read the comment docs.

@tmorehouse
Copy link
Member

tmorehouse commented Dec 8, 2018

@jackmu95 So just to make sure I'm on the same page, this issue is with adding a @click handler on a dropdown item, and it is not being called because the menu is being closed before it gets a chance to run?

@jacobmllr95
Copy link
Member Author

Yes exactly.

@tmorehouse

This comment has been minimized.

@tmorehouse

This comment has been minimized.

@tmorehouse

This comment has been minimized.

@jacobmllr95 jacobmllr95 closed this Dec 9, 2018
@tmorehouse

This comment has been minimized.

@jacobmllr95 jacobmllr95 reopened this Dec 9, 2018
@jacobmllr95

This comment has been minimized.

@tmorehouse

This comment has been minimized.

@jacobmllr95

This comment has been minimized.

@tmorehouse

This comment has been minimized.

@jacobmllr95

This comment has been minimized.

@tmorehouse

This comment has been minimized.

@jacobmllr95

This comment has been minimized.

@tmorehouse

This comment has been minimized.

@jacobmllr95

This comment has been minimized.

@tmorehouse

This comment has been minimized.

@tmorehouse

This comment has been minimized.

@jacobmllr95

This comment has been minimized.

@tmorehouse

This comment has been minimized.

@tmorehouse

This comment has been minimized.

@jacobmllr95
Copy link
Member Author

@tmorehouse I'am happy with this now. Can you please review this again?

@tmorehouse

This comment has been minimized.

@tmorehouse tmorehouse mentioned this pull request Dec 10, 2018
89 tasks
@jacobmllr95

This comment has been minimized.

@tmorehouse

This comment has been minimized.

@tmorehouse

This comment has been minimized.

@tmorehouse

This comment has been minimized.

@jacobmllr95

This comment has been minimized.

@jacobmllr95

This comment has been minimized.

@tmorehouse
Copy link
Member

Looks good.. any other tweaks you need before merging?

@jacobmllr95
Copy link
Member Author

I'am done here and really happy with what we came up here.

@tmorehouse tmorehouse merged commit 1853954 into bootstrap-vue:dev Dec 10, 2018
@tmorehouse
Copy link
Member

Thanks for the great work!

@jacobmllr95 jacobmllr95 deleted the fix-dropdown-menu-focusout-handling branch December 10, 2018 22:59
tmorehouse added a commit that referenced this pull request Dec 11, 2018
* fix(dropdown): Menu focusout close handling (#2252)

* feat(table): Selectable rows (fixes #1790) (#2260)

* feat(modal): Make stackable optional (#2259)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants