Anyone know why any modals on my theme have to be closed by clicking outside of the modal instead of clicking the 'X'? The 'X' will not close the modal...nothing happens!
Not a huge issue, but annoying for sure...any ideas how to fix?
Flatty theme was updated for 1.8.20 and your templates show 1.8.13
I downloaded Flatty now onto my 1.8.21 and i do notice that there is a small problem with the close modal image not showing, but it does close by clicking where the image is supposed to be on the top right hand corner.
Yeah, mine will close if you click anywhere outside of the modal but not on the X, LOL!
I don't think I can update the theme right now, I have a ton of custom edits to the post control buttons an nav...it would be a nightmare!
Hi,
the problem is:
jquery.plugins.js?ver=1813:442 Uncaught TypeError: Cannot read property 'close' of null
at HTMLAnchorElement.$.modal.close (jquery.plugins.js?ver=1813:442)
at HTMLDocument.dispatch (jquery.js?ver=1813:2)
at HTMLDocument.y.handle (jquery.js?ver=1813:2)
And I see 2 files with different code and for the '$.modal.close', they are:
jquery.plugins.js
$.modal.prototype = {
constructor: $.modal,
open: function() {
var m = this;
this.block();
if(this.options.doFade) {
setTimeout(function() {
m.show();
}, this.options.fadeDuration * this.options.fadeDelay);
} else {
this.show();
}
$(document).off('keydown.modal').on('keydown.modal', function(event) {
var current = getCurrent();
if (event.which == 27 && current.options.escapeClose) current.close();
});
if (this.options.clickClose)
this.$blocker.on('click',function(e) {
if (e.target==this)
$.modal.close();
});
},
jquery.plugins_e.js
$.modal.prototype = {
constructor: $.modal,
open: function() {
var m = this;
if(this.options.doFade) {
this.block();
setTimeout(function() {
m.show();
}, this.options.fadeDuration * this.options.fadeDelay);
} else {
this.block();
this.show();
}
if (this.options.escapeClose) {
$(document).on('keydown.modal', function(event) {
if (event.which == 27) $.modal.close();
});
}
if (this.options.clickClose) this.blocker.click($.modal.close);
},
So, I bet there's the problem. There are a lot of code that is the same in each file. I don't know if you could copy the contens in one file and only stay with one of them, but 'calling' two times the same file could make any error.
I tested by hiding jquery.plugins_e.js and the modals closed like they should!! BUT, it broke my dropdown menus in the nav bar!
I then tested by hiding jquery.plugins.js and multiple things on the forum broke and the modal still didn't close...so I think I need to keep the jquery.plugins.js file but something must be wrong in it to not allow the menus to work??? See screen cap below...dropdown opens at bottom of the screen instead of under the "FUN STUFF' link like it should.
Hi,
what I would test is:
Edit jquery.plugins_e.js and remove all the code from the first line:
/**
* jGrowl 1.4.3
*
to just before these lines:
/*! jQuery-Impromptu - v6.2.1 - 2015-05-10
* http://trentrichardson.com/Impromptu
Save the file and test your web if all works as intended.
(We've just removed the old version of the code that is updated in jquery.plugins.js)
OK, i made the edit but everything seems the same...modal still does not close with the 'X'
No good, it did make the modal work but the drop down menus are messed up again.
Yeah,
I'm looking at the problems with the dropdowns.
I don't get why this part of the code it's not working correctly:
popup_menu.css({
position: 'absolute',
top: offset.top,
left: offset.left-adjust
});
Sorry can't help you more... Wait, I see it!
Repeat the process I said in
my last post.
Now we have to edit the other file (jquery.plugins.js). Search for:
popup_menu.css({
position: 'absolute',
top: offset.top,
left: offset.left-adjust
});
And replace it with:
popup_menu.css({
position: 'absolute',
// top: offset.top,
left: offset.left-adjust
});
Now all should work (modal close & dropdown menus)
PERFECT!!! That did the trick! I don't know how you noticed those 2 missing forward slashes but I am sending you some rep!!
Thanks!!