freeze the editor when reconnecting

This commit is contained in:
Caleb James DeLisle 2017-10-13 13:40:51 +03:00
parent 854c1e94a4
commit a6b34491fc
1 changed files with 7 additions and 0 deletions

View File

@ -365,6 +365,13 @@ define([
if (href) { ifrWindow.open(bounceHref, '_blank'); }
};
framework.onEditableChange(function (unlocked) {
if (!framework.isReadOnly()) {
$(inner).attr('contenteditable', '' + Boolean(unlocked));
}
$(inner).css({ background: unlocked ? '#fff' : '#eee' });
});
framework.setMediaTagEmbedder(function ($mt) {
$mt.attr('contenteditable', 'false');
$mt.attr('tabindex', '1');