Force hallo to save changes after a paste or drag

pull/2605/merge
Matt 2016-05-12 12:55:30 +01:00 zatwierdzone przez Matt Westcott
rodzic 024b96d0ed
commit a7262783f3
1 zmienionych plików z 13 dodań i 2 usunięć

Wyświetl plik

@ -32,6 +32,14 @@ function makeRichTextEditable(id) {
removeStylingPending = false;
}
/* Workaround for faulty change-detection in hallo */
function setModified() {
var hallo = richText.data('IKS-hallo');
if (hallo) {
hallo.setModified();
}
}
var closestObj = input.closest('.object');
richText.hallo({
@ -44,8 +52,11 @@ function makeRichTextEditable(id) {
setTimeout(removeStyling, 100);
removeStylingPending = true;
}
}).bind('paste', function(event, data) {
setTimeout(removeStyling, 1);
}).bind('paste drop', function(event, data) {
setTimeout(function() {
removeStyling();
setModified();
}, 1);
/* Animate the fields open when you click into them. */
}).bind('halloactivated', function(event, data) {
$(event.target).addClass('expanded', 200, function(e) {