I have an absolutely strange error that I have ever encountered, and I'm close to that. Anyone who has ideas on how to debug this (or any smart workarounds) will be awesome.
Problem:
I am making a simple WYSIWYG editor in Firefox using contenteditable. The problem occurs when I load text for editing through ajax. Before loading, the cursor is displayed in order (for a split second), and after loading the text, it disappears. You can still enter text, and the cursor definitely remains βthereβ (the status field shows the current line / col is just fine), but the cursor does not appear and the selection overlay does not appear.
Here's what makes it really strange: by clicking ANYWHERE on any other dom element, on firebug, even in another window, it returns the cursor and behaves as usual. In fact, the only time the cursor has any problems is at the very beginning when the page initially loads or refreshes. Clicking anywhere inside the contentedtiable div does not fix it - you need to click outside so that it refreshes.
Right now, I just need a workaround. I tried 500 variants of $ (someelement) .click or $ (somelement) .focus, but they do not fully replicate the "actual" click from the user.
Has anyone seen anything like this before? Thank you
source share