diff --git a/editor.js b/editor.js
index a6e7baf..fbd50cb 100644
--- a/editor.js
+++ b/editor.js
@@ -1074,17 +1074,17 @@ You should have received a copy of the GNU General Public License along with thi
//For contextmenu
$(document.body).mousedown(function(event) {
var target = $(event.target);
- if (!target.parents().andSelf().is('#context-menu')) { // Clicked outside
+ if (!target.parents().addBack().is('#context-menu')) { // Clicked outside
$('#context-menu').remove();
}
- if (!target.parents().andSelf().is('#specialchar') && (target.closest('a').html()!='')) { //Clicked outside
+ if (!target.parents().addBack().is('#specialchar') && (target.closest('a').html()!='')) { //Clicked outside
if($("#specialchar").is(':visible'))
{
$(editor_Content).data("editor").data("splcharsBtn", null);
$('#specialchar').remove();
}
}
- if (!target.parents().andSelf().is('#paletteCntr') && (target.closest('a').html()!='')) { //Clicked outside
+ if (!target.parents().addBack().is('#paletteCntr') && (target.closest('a').html()!='')) { //Clicked outside
if($("#paletteCntr").is(':visible'))
{
$(editor_Content).data("editor").data("colorBtn", null);