question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Add animation to modal when its backdrop is static.

See original GitHub issue

When the modal has the property:

{backdrop: 'static', keyboard: false}

Or when it has the attributes:

data-backdrop="static" data-keyboard="false"

Obviously, it would not be close if the user tries to click outside of it and also using <kbd>esc</kbd> key. Then it should show the user that anything is important in modal (user needs to check modal) by showing any animation like scale to get the user attention there. Like the chrome’s clear browser data modal:

ubhyfdbl4s

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
bkdotcomcommented, Jun 14, 2018

What if bootstrap fired a hidePrevented.bs.modal event? You could then control what happens… perhaps bootstrap could do the animation unless you call preventDefault() on the event

2reactions
florianlacreusecommented, Nov 26, 2018

Agree. In applications with both static and non-static modals, user may be confused with these two different behaviors without feedback (on hide prevented).

It looks like we could fire the event from here:

https://github.com/twbs/bootstrap/blob/32ab52ba2e9dc2549304fcef14dede7806384f34/js/src/modal.js#L355-L359

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap Modal sitting behind backdrop - Stack Overflow
Just move the entire modal outside of the rest of your code, to the very bottom. It doesn't need to be nested in...
Read more >
Modal - Bootstrap
Use Bootstrap's JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.
Read more >
backdrop - CSS: Cascading Style Sheets - MDN Web Docs
The ::backdrop pseudo-element makes it possible to obscure, style, or completely hide everything located below the element when it's the ...
Read more >
Bootstrap Modal -- Tutorials with advanced examples - Torus Kit
When backdrop is set to static, the modal will not close when clicking outside it. Click the button below to try it.
Read more >
Modal · Boosted v5.2
Use Boosted's JavaScript modal plugin to add dialogs to your site for lightboxes, ... When backdrop is set to static, the modal will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found