Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.x-dev
Component:
Modal
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Nov 2015 at 19:39 UTC
Updated:
5 Jan 2017 at 20:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mdeltito commentedComment #3
nicobot commentedIt works for me.
Comment #4
capynet commentedIt works for me too.
tnx!
Comment #5
dsnopekHere's a version of this that also scopes to the
.modal-headerselector (since there can be elements with the "close" class in the modal body, not just the close button in the header) and makes sure to onlyunbind()on the correct elements (although, this is just a performance improvement, it should be harmless to unbind an event that was never bound).Comment #6
dsnopekWe're using this patch in Panopoly.
Comment #7
joelpittet@dsnopek your patch in #2 looked better to me. Checking the
.modal-headeris good though.modalContent=$('#modalContent'), though using the reference can help not parse the DOM as much.How about:
var $modalHeader = modalContent.find('.modal-header');
$('.close', $modalHeader)
Comment #8
dsnopekI'm not opposed to that! :-)
Comment #9
joelpittetHow's this?
Comment #10
socialnicheguru commentedI could not close modals in panels
modal.js?ocrnxd:680 Uncaught ReferenceError: $modalContent is not definedDrupal.CTools.Modal.unmodalContent @ modal.js?ocrnxd:680
Drupal.CTools.Modal.dismiss @ oa_basetheme.modal.js?ocrnxd:117Drupal.CTools.Modal.modal_dismiss @ modal.js?ocrnxd:333Drupal.ajax.success @ ajax.js?v=7.50:428success @ ajax.js?v=7.50:189c.success @ jquery.form.min.js?v=2.69:11o @ jquery.min.js?v=1.7.2:2fireWith @ jquery.min.js?v=1.7.2:2w @ jquery.min.js?v=1.7.2:4d @ jquery.min.js?v=1.7.2:4
Comment #11
joelpittetThanks for testing @SocialNicheGuru, I missed something it looks like. Here's the missing variable.
Comment #12
joelpittetComment #13
rivimeyPatch in #11 applies cleanly to 7.x-1.x and looks good to me.
More +1 responses to #11 would be helpful (@dsnopek?), but I think this one is good to go.
Comment #14
joelpittetFeel free to change the status to "reviewed and tested by the community" if it's working for you, that would help it get in
Comment #15
rivimeyProposing RTBC - slightly reluctantly because there are no 'corroborating' comments, but as far as I can see this should be a good change.
Comment #16
joelpittetThanks, I'm sure if the maintainers have any concern they will knock it back to needs work, so there is at least 3 people who have reviewed and tested it.
Comment #17
damienmckennaComment #18
japerryThe best way to test code is to deploy code. ;)
Since this is a relatively small patch, Committed.