diff -u b/core/modules/image/js/editors/image.js b/core/modules/image/js/editors/image.js --- b/core/modules/image/js/editors/image.js +++ b/core/modules/image/js/editors/image.js @@ -22,12 +22,13 @@ // Set our original value to our current HTML (for reverting). this.model.set('originalValue', $.trim(this.$el.html())); // $.val() callback function for copying input from our custom form to - // the Quickedit Field Form. + // the Quick Edit Field Form. this.model.set('currentValue', function (index, value) { var matches = $(this).attr('name').match(/(alt|title)]$/); if (matches) { var name = matches[1]; - var $input = $('.quickedit-image-field-info input[name="' + name + '"]'); + var $toolgroup = $('#' + options.fieldModel.toolbarView.getMainWysiwygToolgroupId()); + var $input = $toolgroup.find('.quickedit-image-field-info input[name="' + name + '"]'); if ($input.length) { return $input.val(); } @@ -262,7 +263,8 @@ * The current Field Model. */ renderToolbar: function (fieldModel) { - var $toolbar = $('.quickedit-image-field-info'); + var $toolgroup = $('#' + fieldModel.toolbarView.getMainWysiwygToolgroupId()); + var $toolbar = $toolgroup.find('.quickedit-image-field-info'); if ($toolbar.length === 0) { // Perform an AJAX request for extra image info (alt/title). var fieldID = fieldModel.get('fieldID'); @@ -270,7 +272,7 @@ var self = this; self.ajax('GET', url, null, function (response) { $toolbar = $(self.template_toolbar(response)); - $('#' + fieldModel.toolbarView.getMainWysiwygToolgroupId()).append($toolbar); + $toolgroup.append($toolbar); $toolbar.on('keyup paste', function () { fieldModel.set('state', 'changed'); }); diff -u b/core/modules/image/src/Controller/QuickeditImageController.php b/core/modules/image/src/Controller/QuickeditImageController.php --- b/core/modules/image/src/Controller/QuickeditImageController.php +++ b/core/modules/image/src/Controller/QuickeditImageController.php @@ -81,7 +81,7 @@ * The view mode of the field that is being rendered. * * @return \Symfony\Component\HttpFoundation\JsonResponse - * The Ajax response. + * The JSON response. */ public function upload(EntityInterface $entity, $field_name, $langcode, $view_mode_id) { $field = $this->getField($entity, $field_name, $langcode); diff -u b/core/modules/image/src/Plugin/InPlaceEditor/Image.php b/core/modules/image/src/Plugin/InPlaceEditor/Image.php --- b/core/modules/image/src/Plugin/InPlaceEditor/Image.php +++ b/core/modules/image/src/Plugin/InPlaceEditor/Image.php @@ -21,11 +21,8 @@ $field_definition = $items->getFieldDefinition(); // This editor is only compatible with single-value image fields. - if ($field_definition->getFieldStorageDefinition()->getCardinality() == 1 - && $field_definition->getType() == 'image') { - return TRUE; - } - return FALSE; + return $field_definition->getFieldStorageDefinition()->getCardinality() === 1 + && $field_definition->getType() === 'image'; } /** only in patch2: unchanged: --- a/core/modules/image/image.install +++ b/core/modules/image/image.install @@ -61,3 +61,10 @@ function image_requirements($phase) { return $requirements; } + +/** + * Flush caches as we changed field formatter metadata. + */ +function image_update_8001() { + // Empty update to trigger a cache flush. +}