From 73063ee49a818f11cf4763280f620db5a687a8ef Mon Sep 17 00:00:00 2001 From: webchick <webchick@24967.no-reply.drupal.org> Date: Tue, 9 Jul 2013 09:39:04 -0400 Subject: [PATCH] Issue #2035083 by Wim Leers: Fix body in-place editing in teasers by triggering formUpdated event. --- core/modules/editor/js/editor.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/modules/editor/js/editor.js b/core/modules/editor/js/editor.js index 9bbce1d2e5ba..5893e116075d 100644 --- a/core/modules/editor/js/editor.js +++ b/core/modules/editor/js/editor.js @@ -106,7 +106,14 @@ Drupal.editorAttach = function (field, format) { field.removeAttribute('required'); } + // Attach the text editor. Drupal.editors[format.editor].attach(field, format); + + // Ensures form.js' 'formUpdated' event is triggered even for changes that + // happen within the text editor. + Drupal.editors[format.editor].onChange(field, function () { + $(field).trigger('formUpdated'); + }); } }; -- GitLab