Emoji Extended Plugin Problem
-
I am running nodebb 0.7.3 and the emoji extended plugin that comes installed out of the box does not seem to work. Clicking on the emoji icon to bring up the modal with all the emoticons works but when you click on an emoticon it does not get inserted into the post. Also, none of the tabs in the emoji modal work. I just tried adding an emoticon in this post and the same problem seems to be there. Is this a known issue?
-
@baris it seems any DOM changes remove custom-assigned
click
events from anya
tag inside:The simplified case of the emoji problem is
var link = $("<a>hello world</a>").click(function() { console.log("clicked"); }); link.click(); // outputs "clicked" bootbox.dialog({message: link}); link.click(); // does nothing
Is this going to be fixed within core? Otherwise I'd need to assign click-events after DOM-insertion... but would be nasty.
-
@frissdiegurke said:
var link = $("<a>hello world</a>").click(function() { console.log("clicked"); });
link.click(); // outputs "clicked"
bootbox.dialog({message: link});
link.click(); // does nothingI don't get what the problem is in core?
Can you do
var link = $("<a id="my-button">hello world</a>"); bootbox.dialog({message: link}); $('#my-button').click(function() { console.log("clicked"); }); link.click();
-
It seems like the element I pass isn't the element that gets displayed afterwards.
A copy must get created somewhere (which doesn't copy events obviously) - I triedlink.remove()
to ensure.Since if you for example run the same on http://bootboxjs.com/ it works as expected without getting copied. So it has to be somehow core-related (also due to the fact that it worked recently).
It seems @psychobunny customized your bootbox library 2 days ago... https://github.com/NodeBB/NodeBB/commit/0caa095ea479256278c87dc69ea603f6abb7d55e I bet this is related .
And I bet the problem lies withintranslate(...)
. -
Missed this thread, but the issue has since been fixed as of yesterday
-
glad to hear, great.