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

close via Escape keyboard button #22

Open
vitovalov opened this issue May 26, 2015 · 2 comments
Open

close via Escape keyboard button #22

vitovalov opened this issue May 26, 2015 · 2 comments

Comments

@vitovalov
Copy link

I've noticed that one cannot close the modal with escape key.
It seems an old bug in bootstrap. However the tabindex="-1" thing is neither working.

@dmiyamasu
Copy link

I am experiencing this issue too.

@royourboat
Copy link

royourboat commented May 19, 2023

I found the escape key worked if I clicked on the popup first. That's obviously not ideal. To fix this, I removed "fade" from the div class in _includes/modals.html. I think it works now.

<div class="portfolio-modal modal fade" id="portfolioModal-{{ post.modal-id }}" tabindex="-1" role="dialog" aria-hidden="true">
becomes

<div class="portfolio-modal modal" id="portfolioModal-{{ post.modal-id }}" tabindex="-1" role="dialog" aria-hidden="true">

I'm a novice and don't understand further as to why this works. In _includes/css/main.css, you can see the following at the end of the file:

/* Fix modal mouse wheel issues /
/
twbs/bootstrap#16297 */
.modal.fade.in {
transform: translateZ(0);
-webkit-transform: translateZ(0);
}

Looks like there used to be a scrolling bug? I can't seem to reproduce it on firefox or chrome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants