Comments (9)
Is there a reason you're trying to use both? What version of Bootstrap are you trying to use? The current version of Bootbox is only meant for Bootstrap 3.
from bootstrap-modal.
yes , i want to use both bootbox and bootstrap-modal , and i‘am using bootstrap 3. so i included the "bootstrap-modal-bs3patch.css" in the page. but it made the bootbox window’s sytle abnormal.
from bootstrap-modal.
Bootbox doesn't have any styles of its own. We create the Bootstrap modal from string templates - everything else (display-wise) is pure Bootstrap. I would assume that patch file is for a much earlier version of Bootstrap, especially since this project was created for Bootstrap 2.
If you really want to mix these projects (which, I'll be honest, I don't entirely get), I would suggest creating a jsFiddle or similar that demonstrates what you're seeing. If you do that, I will try to take a look at what the problem might be, although I make no promises that I could come up with a fix.
from bootstrap-modal.
hey all, it's been a long time since I've touched this lib and have not used bootstrap in a long time so maintenance / development has pretty much halted. I believe at some point bootbox and this plugin could play nicely but it's not something I ever accounted or tested for.
Thanks @tiesont for offering to take a look at this. I share the sentiment that if someone can provide a jsfiddle / reproducible I'll see what I can do to help find a workaround or if theres a simple fix I would gladly accept PRs.
from bootstrap-modal.
@tiesont i see the bootbox doesn't have any styles files. but it‘s script used original bootstrap modal . and this bootstrap-modal's style file "bootstrap-modal-bs3patch.css" change the original style . then make the bootbox’s window(also can call it “the original bootstrap modal”) becomes abnormal . and "bootstrap-modal-bs3patch.css" isn't use to compatible for previous versions of bootstrap , it's used for bootstrap 3.
from bootstrap-modal.
@jellybins I am aware of what the various files are used for; I used bootstrap-modal prior to switching to (and eventually becoming a maintainer for) Bootbox, and I still recommend it for devs that want more control over their modals than Bootbox can accommodate. The problem is that Bootstrap's modal markup has changed a little in each version of Bootstrap - even Bootstrap 4 requires updates to how modals are made, something I'm working on for the next version of Bootbox. There are also subtle differences in how the actual modal plugin works in each version of Bootstrap (in part due to how the markup changes).
It's also worth noting that bootstrap-modal, rather than encapsulating it's own function name, replaces the $.fn.modal
function from Bootstrap.js - since Bootbox calls that internally, I would not be surprised if that is (in part) a reason for unusual behavior in Bootbox.
I'll reiterate my point from above;
I would suggest creating a jsFiddle or similar that demonstrates what you're seeing. If you do that, I will try to take a look at what the problem might be, although I make no promises that I could come up with a fix.
I have no problem trying to help you solve this problem (as @jschr says, he's not really active in Bootstrap these days, so...), but I'm not going to go through and try recreating what you're seeing entirely on my own. To quote Jerry Maguire: "Help me... help you"
from bootstrap-modal.
@tiesont @jschr i found the jsfiddle couldn't show modal window then creat the test.html in the upload file. just open that you can see the effect, then edit it remove the ref of ''bootstrap-modal-bs3patch.css" open thant again.
from bootstrap-modal.
@jellybins I'm not entirely following what you're trying to say, there. I can tell you that Bootbox behaves as expected on it's own, in your test file, so it's definitely an issue originating from bootstrap-modal. I'll have to dig into the source to see what's going on, but I'm assuming it's just plain a matter of incompatibility.
Can you tell me exactly what it is you need that leads to trying to load both libraries at the same time?
from bootstrap-modal.
Here's my take, based on the README for bootstrap-modal;
The latest version (v4) of Bootbox is not compatible with bootstrap-modal, owing to this:
Since this plugin was created to solve a lot of the issues with BS2, it still uses the BS2 markup syntax.
It does seem to more or less work with the latest v3 version of Bootbox, which makes sense - Bootbox 3 was built for Bootstrap 2.2, which is where Bootstrap introduced a lot of breaking changes, including changes to the modal plugin and the markup and CSS it uses. If you decide to go that route, you'll want to review the v3 docs, as Bootbox also changed fairly significantly between 3.3 and the 4.0 release.
from bootstrap-modal.
Related Issues (20)
- is there any compatibility issues with select2.js? HOT 1
- Construct ajax query (ie. ajax Contact form)
- can i use this without bootstrap HOT 1
- angular 1.2.* ng-include used inside ui-bootstrap - modal opening page scrolls to top
- Show Modal Without overlay.
- Modal opens with a delay compared to standard BS3 modal
- Use modal with form validation
- body class="modal-open" style="padding-right: 15px" HOT 1
- Modal don't scroll when closing top modal
- The bootstrap dependency is different between github repo and bower repo.
- make collapsable?
- event.relatedTarget()
- How to relocate modal inside into a div
- Publish as NPM package
- Incompatible with Boostrap 4? HOT 4
- Stackable: Close modal when clicked outside
- Will you upgrade to Bootstrap 4? HOT 1
- event listener for complete loading
- Replaced # with javascript:; in this statement and it worked.
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-modal.