Comments (13)
would you also be able to add similar support to bootstraps data-keyboard and data-backdrop http://getbootstrap.com/javascript/#modals-options ? Currently you can keep the modal visible if the user clicks outside of it but the backdrop disappears. Also it'd be nice to prevent the escape key from closing the modal but only for specific dialogs
from bootstrap.native.
We already support those options. I also don't understand perfect what you mean.. are you using multiple opened modals at the same time?
from bootstrap.native.
They don't really work, or I am doing something wrong. Here is a super simple testcase
Edit line 228 on the provided index.html file
https://github.com/thednp/bootstrap.native/blob/master/index.html#L228
Change it to be
Click the "Launch Simple Modal" button and then click escape. The modal stays but the backdrop disappears. I can reproduce this in both Chrome 46 and FireFox 38.
You can also mouse click outside of the modal and it will disappear
from bootstrap.native.
Sorry HTML got stripped out
div id="myModal" class="modal fade" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
is what you change it to
from bootstrap.native.
If you change the data-backdrop
or data-keyboard
after Modal was initialized would produce no effect because the Modal object caches the options values once and no more. I should have shown a demo where they showcase these options I guess.
from bootstrap.native.
Not sure I follow, I'm not changing the values after initializing, I'm just adding them to the example modal on the demo page. The keyboard one is partially taking effect because the modal stays but the backdrop disappears when pressing escape
from bootstrap.native.
So you downloaded the demo, edited the index.html
file with these options on the modal example and you spotted the issue? Please, what is your OS and browser?
from bootstrap.native.
Correct I downloaded a zip from github, extracted the files to a new directory, made the one change to index.html on line 228 to add data-backdrop="static" and data-keyboard="false", saved, then opened index.html and clicked on launch simple modal. When I click outside of the modal it disappears which is not what data-backdrop="static" does for bootstrap. When I click escape on my keyboard the modal background disappears but the modal is left in place
I'm on windows 7 and can reproduce in Chrome 46 and FireFox 38
Are you not able to reproduce this problem?
from bootstrap.native.
I don't have much time to test (I know if I start testing I usually start working on it and thus takes even more time), so I noted here a little to do for the next release. I also noted your report, so thank you, I will solve the issue asap.
from bootstrap.native.
@osdlge I think your issue is a content related issue, I cannot reproduce the issue at all.
from bootstrap.native.
So when you enable data-backdrop="static" and press the esc key on the modal the backdrop and modal stay in place? The only change I made was to the provided sample and adding data-backdrop="static" data-keyboard="false" tabindex="-1"
from bootstrap.native.
Modal currently doesn't know what data-backdrop="static"
is. Only the options and their values that you see in the demo. The data-backdrop
attribute can only be true / false.
from bootstrap.native.
Done the rework 7985fae
from bootstrap.native.
Related Issues (20)
- tab issues HOT 8
- getInstance behavior change between v4.1 and v4.2? HOT 4
- Popover positioning within sidebar with position fixed HOT 10
- types location needs to be fixed in package.json HOT 1
- dorpdown not support foreach
- Issues with closing a dropdown HOT 4
- offcanvas toggle bottom HOT 3
- BSN 5.0 comes with full Typescript source HOT 1
- Popover overflows bottom HOT 10
- Navbar with off-canvas drawer is hidden by backdrop HOT 5
- Popover button HOT 3
- Replace Bootstrap 4 HOT 1
- Where are the bootstrap 4 docs? HOT 1
- about source code HOT 5
- Dropdown menu closes instantly if user clickes on a span element inside the triggering button HOT 6
- exception when `isEmptyAnchor` called with SVG <use> tag HOT 6
- Bootstrap 4 to BSN migration HOT 2
- Should not import the named export 'version' HOT 2
- Modal close buttons not working when launching via instance.show() HOT 3
- How to enable tree shaking? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap.native.