Wednesday, September 22, 2010


/**
* Workaround for caret disappearing in Firefox when you click HTML Editor
* then Visual Mode.
*
* @see BAZ-24017
*/
_.fixDisappearingCaretInFirefox = function (editor) {
if (x$.browser.mozilla) {
editor.onPostRender.add(function(editor, controlManager) {
setTimeout(function () {
// Focusing away then back seems to fix it. [Jon Aquino 2010-09-22]
var firstButton = x$('a.mceButton:first', editor.getContainer())
firstButton.focus();
editor.focus();
}, 0);
});
}
};

0 Comments:

Post a Comment

<< Home