Closed (fixed)
Project:
Bootstrap
Version:
8.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 May 2017 at 13:35 UTC
Updated:
27 Nov 2018 at 01:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sylvainar commentedComment #3
sylvainar commentedComment #4
sylvainar commentedFixed a typo on the second patch.
Comment #5
mgiffordAlways good to have a few external links:
https://bitsofco.de/accessible-modal-dialog/#6allowtheesckeytoclosethedi...
https://simplyaccessible.com/article/closing-modals/
https://medium.com/@matuzo/writing-javascript-with-accessibility-in-mind...
Comment #6
sylvainar commentedWhen you press ESC everywhere in the site if there is no popup, you got an error in the console. I modified the patch.
Comment #7
sylvainar commentedFix typo
Comment #8
sylvainar commentedFix typo
Comment #9
markhalliwellI'm all for adding accessibility, however this feature further deviates from the native Bootstrap plugin (more so than it already has).
To keep BC, I would say this would also need a setting that could be disabled if such functionality is not desired, for whatever reason.
---
This should be
.on('keyup.bs.popover', function (e) {instead.Comment should be above the method/anonymous function invocation with a space before it as well (in between chain).
Also, there's no need for two
ifcode blocks here, just use one with&&.Comment #10
markhalliwellbump...
Comment #11
markhalliwellbump... again...
Comment #12
sylvainar commentedWow, it's been a while actually…
I corrected the patch according to your review, and added a parameter in the theme configuration.
Comment #14
sylvainar commentedFail, I submitted an empty patch…
This one should work.
Comment #15
sylvainar commentedComment #16
markhalliwellAgain, this should be
.on('keyup.bs.popover', function (e) {.That being said, it really shouldn't be bound at all unless the setting is enabled.
This shouldn't be using the global setting. Individual popups may have this option manually configured. This should retrieve the option from
$currentPopoveritself.Comment #17
markhalliwellOk. I've gone through the existing code and the above patches.
The more I looked at it, the more I realized it made very little difference to have an additional setting just for escape.
Furthermore, the existing
popover_trigger_autoclosesetting doesn't really make a lot of sense, name wise; so I've renamed itpopover_auto_closeand combined all the existing functionalty with the new functionality as a single setting.The description of the new setting explains in great detail when an automatic close will happen.
I've also gone ahead and created a change record for this issue.
Comment #19
loopduplicate commentedWhile browsing anonymously, I get "Uncaught Error: Syntax error, unrecognized expression: unsupported pseudo: focusable". From a quick internet search, it appears as though this pseudo selector is only available if jQuery UI is loaded.
Hopefully I'll figure out a nice fix today. If I do, I'll create a separate issue with a patch and link back to this one.
Comment #20
loopduplicate commentedI added a new issue with a patch to address the issue I brought up in #19. https://www.drupal.org/project/bootstrap/issues/3013236#comment-12853020