focus - Firefox cursor invisible, becomes visible when clicking anything else -
i have absolutely strangest bug i've ever encountered, , i'm near wit's end on one. ideas on how debug (or clever workarounds) awesome.
the problem:
i'm making simple wysiwyg editor in firefox using contenteditable. problem appears when load text edit via ajax. before load, cursor appears fine (for split second), , once text loads disappears. can still enter text, , cursor still "there" (a status box shows current line/col fine), cursor not visible , selection overlay not appear.
here's makes strange: clicking anywhere, on other dom element, on firebug, on window -- makes cursor return , behave normal. in fact, time cursor has problems @ beginning, when loading page or on refresh. clicking anywhere inside contentedtiable div not fix -- have click outside refresh.
right now, need workaround. i've tried 500 flavors of $(someelement).click or $(somelement).focus, don't replicate "actual" click user.
has seen before? thanks.
well, didn't find out causing problem, found quick-and-dirty fix trick. append anchor tag dom, focus (using jquery .focus), , remove it.
i tried .focus many times before, tried on div or li elements, didn't trick. needs anchor tag. suspect it's because anchor tag has visible component focus, resets in firefox's internal cursor display mechanism.
either way, if you're trying solve problems , doesn't fix it, @ morgantiley's explanation -- might give leads.
Comments
Post a Comment