From 2e7f3636eaadde33ab26cd1f5b64db62502c599c Mon Sep 17 00:00:00 2001 From: Mikk3lRo Date: Fri, 13 Oct 2017 11:25:13 +0200 Subject: [PATCH] Fix missing close button when closeButton = true and title (or getTitle) set --- Source/jBox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/jBox.js b/Source/jBox.js index 8b65475..2d02bff 100644 --- a/Source/jBox.js +++ b/Source/jBox.js @@ -417,7 +417,7 @@ this.closeButton = jQuery('
').on('touchend click', function (ev) { this.close({ignoreDelay: true}); }.bind(this)).append(closeButtonSVG); // Add close button to jBox container - if (this.options.closeButton == 'box' || (this.options.closeButton === true && !this.options.overlay && !this.options.title)) { + if (this.options.closeButton == 'box' || (this.options.closeButton === true && !this.options.overlay && !this.options.title && !this.options.getTitle)) { this.wrapper.addClass('jBox-closeButton-box'); this.closeButton.appendTo(this.container); } @@ -562,7 +562,7 @@ }).appendTo(this.options.appendTo); // Add close button to overlay - (this.options.closeButton == 'overlay' || (this.options.closeButton === true && !this.titleContainer)) && this.overlay.append(this.closeButton); + (this.options.closeButton == 'overlay' || this.options.closeButton === true) && this.overlay.append(this.closeButton); // Add closeOnClick: 'overlay' events this.options.closeOnClick == 'overlay' && this.overlay.on('touchend click', function () { this.close({ignoreDelay: true}); }.bind(this));