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

depends on bootstrap.min.js #21

Closed
mschwartz opened this issue Sep 28, 2014 · 6 comments
Closed

depends on bootstrap.min.js #21

mschwartz opened this issue Sep 28, 2014 · 6 comments
Assignees

Comments

@mschwartz
Copy link

This is an issue because for angular, I would want to use angular-bootstrap. This means I have to include two conflicting scripts: bootstrap.min.js and ui-bootstrap-tpls.js. That is, if I don't include bootstrap.min.js, angular-summernote throws an error - it must be calling something in that javascript directly (summernote is).

The problem is they conflict. I have a dropdown menu on my nav bar and with both those loaded, I have to click twice to open the dropdown. If I remove either, I only have to click once, but summernote stops working.

Suggestions?

@outsideris outsideris self-assigned this Sep 29, 2014
@outsideris
Copy link
Owner

@mschwartz
I think the problem is over angular-summernote's coverage.
Did you see ui-bootstrap's issue? I think it's helpful for your problem.

@mschwartz
Copy link
Author

Yes, thank you. I removed data-dropdown and now only one click is required.

However, maybe it should be noted somewhere on your wiki or README.md?

On Sat, Oct 4, 2014 at 4:04 AM, JeongHoon Byun (aka Outsider) <
[email protected]> wrote:

@mschwartz https://github.com/mschwartz
I think the problem is over angular-summernote's coverage.
Did you see ui-bootstrap's issue
angular-ui/bootstrap#2156? I think it's
helpful for your problem.


Reply to this email directly or view it on GitHub
#21 (comment)
.

@outsideris
Copy link
Owner

@mschwartz
You are right! I think README is better place to put it.
Can you write about the problem and solution clearly? Because I didn't experience the problem.
If so, I put it the README or pull request is welcome.

@mschwartz
Copy link
Author

AngularUI Bootstrap module is written to replace the JavaScript file for
bootstrap with its own implementation (ui-bootstrap-tpls.min.js).

Summernote was intended to work with Bootstrap, so the coder implemented
features that rely on the bootstrap.js file being present.

If you do not include bootstrap.js, summernote throws exceptions. If you
do not include ui-bootstrap-tpls.min.js, your angular directives for
bootstrap will not work.

If you include both, then both JavaScript files try to listen on various
events, and otherwise may have incompatibility issues.

If you have a drop down in the navbar, and use data-dropdown directive as
bootstrap says to, then two clicks are required to open the drop down
(menu) instead of the expected one click.

The solution is to not use data-dropdown directive. However, the real
solution is for summer note to be agnostic about which of bootstrap.js or
ui-bootstrap-tpls.min.js are loaded and make the right calls.

@outsideris
Copy link
Owner

Thanks @mschwartz

@scne
Copy link

scne commented Jun 15, 2016

@mschwartz I'm usign ui.bootstrap module but I've still a lot of troubles 🆘

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