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

Doesn't work with older versions of jquery-rails #27

Closed
Ajedi32 opened this issue Apr 3, 2015 · 3 comments
Closed

Doesn't work with older versions of jquery-rails #27

Ajedi32 opened this issue Apr 3, 2015 · 3 comments

Comments

@Ajedi32
Copy link

Ajedi32 commented Apr 3, 2015

I am in the process of upgrading my application from Bootstrap 2 to Bootstrap 3. After updating, I discovered the version of twitter-bootstrap-rails-confirm I had installed no longer worked correctly with the new version of Bootstrap (which I expected to happen, no problems there).

After updating twitter-bootstrap-rails-confirm from 1.0.1 to 1.0.4 though, the gem no longer worked at all. When clicking on buttons which required confirmation in my app, I received no confirmation message (the link target would just be navigated to with a get request) and the following error appeared in the console:

Uncaught Error: Syntax error, unrecognized expression: <div class="modal" id="confirmation_dialog" role="dialog">        <div class="modal-dialog">          <div class="modal-content">            <div class="modal-header">              <button type="button" class="close" data-dismiss="modal">×</button>              <h4 class="modal-title">...</h4>            </div>            <div class="modal-body"></div>            <div class="modal-footer"></div>          </div>        </div>      </div>

Sizzle.error                        jquery.js?body=1:4422
tokenize                            jquery.js?body=1:5077
select                              jquery.js?body=1:5461
Sizzle                              jquery.js?body=1:3999
jQuery.fn.extend.find               jquery.js?body=1:5577
jQuery.fn.jQuery.init               jquery.js?body=1:197
jQuery                              jquery.js?body=1:63
TwitterBootstrapConfirmBox          confirm.js?body=1:30
$.rails.allowAction                 confirm.js?body=1:74
(anonymous function)                jquery_ujs.js?body=1:303
jQuery.event.dispatch               jquery.js?body=1:3075
jQuery.event.add.elemData.handle    jquery.js?body=1:2751

Updating jquery-rails from 2.2.1 to 3.1.2 resolved the problem for me. I recommend you update the docs to indicate which versions of jquery are supported.

@Ajedi32
Copy link
Author

Ajedi32 commented Apr 3, 2015

Or maybe this is an issue with Bootstrap itself? Not sure...

@rvanlieshout
Copy link
Member

Hmm... could be. we'll have to test what jquery version triggers this error

@rvanlieshout
Copy link
Member

Updated readme

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

2 participants