Hi,
Is there a way to apply the :focus pseudo-class?
I've tried with:
var ev = document.createEvent("MouseEvents");
ev.initEvent("click", true, true);
document.querySelector("#text").dispatchEvent(ev);
And with jQuery:
$("#text").focus();
Even though the document.activeElement has the correct element, the :focus CSS pseudo-class is not applied :-(
Any idea how to make this work?
-- RGL