I'm developing a code editor. Actually, I'm at the end of the version 2.0.1 which is an important version containing new functionnalities. But just before to update the Google Chrome browser to his latest version (64...), I maked a few change in my code and I don't know anymore what is it.
After Chrome updated, when I open the editor file, I can not click on javascript button or links. This does not work on other browser too. I took a screen shoot of my console.
There are the events that I used : click
, load
, beforeunload
, ready
, keyup
, keydown
, online
, offline
, mousedown
, mousemove
, mouseover
, mouseout
, mouseup
, touchstart
, touchmove
, touchend
, and the CodeMirror events.
Can someone help me to remove these non-passive events listener which are blocking events on my app ?
I set a breakpoint on -
$("span.jdb-toggle-fullScreen").click(function(){
And it never hit, so I set a breakpoint on the beginning of the containing function -
$(".jdb-author-name").html(jdb.info.detail.author.name[1]).on("click", function() { window.open(jdb.info.detail.author.url); });
And it did hit. I stepped over the lines until I got to this code -
// Say Hi Coder every 24h.
if (jdb.cookie("Hello_World")) { return; }
The condition always returns true after you show some message/toast, I assume and when you load the page again anyhow for the next 24 hours, you will never continue running the containing function and you will never get to the code lines that add the event listeners to those buttons.
Solution -
Change -
// Say Hi Coder every 24h.
if (jdb.cookie("Hello_World")) { return; }
iziToast.show({
title: "Bonjour, cher Codeur! 🎉",
timeout: false, position: "topRight",
onClosing: function() {
jdb.cookie("Hello_World", "Yes", {
expires: 1,
path: "/"
});
}
});
To -
// Say Hi Coder every 24h.
if (!jdb.cookie("Hello_World")) {
iziToast.show({
title: "Bonjour, cher Codeur! 🎉",
timeout: false, position: "topRight",
onClosing: function() {
jdb.cookie("Hello_World", "Yes", {
expires: 1,
path: "/"
});
}
});
}
In order not to run only the toast code when the cookie is there.