Giter VIP home page Giter VIP logo

Comments (13)

 avatar commented on July 16, 2024

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.

thednp avatar thednp commented on July 16, 2024

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.

 avatar commented on July 16, 2024

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.

 avatar commented on July 16, 2024

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.

thednp avatar thednp commented on July 16, 2024

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.

 avatar commented on July 16, 2024

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.

thednp avatar thednp commented on July 16, 2024

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.

 avatar commented on July 16, 2024

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.

thednp avatar thednp commented on July 16, 2024

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.

thednp avatar thednp commented on July 16, 2024

@osdlge I think your issue is a content related issue, I cannot reproduce the issue at all.

from bootstrap.native.

 avatar commented on July 16, 2024

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.

thednp avatar thednp commented on July 16, 2024

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.

thednp avatar thednp commented on July 16, 2024

Done the rework 7985fae

from bootstrap.native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.