From ed10dd815ecb4c52587f6025935d56c8183dd282 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Tue, 18 Mar 2014 03:47:59 +0000 Subject: [PATCH] TinyMCE gallery preview: fix editing the same gallery multiple times. Instead of .data() use .attr('data-...'), jQuery caches the former. Props gcorne, see #26959 git-svn-id: https://develop.svn.wordpress.org/trunk@27581 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/mce-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/js/mce-view.js b/src/wp-includes/js/mce-view.js index 7d5f051574..be2681a06b 100644 --- a/src/wp-includes/js/mce-view.js +++ b/src/wp-includes/js/mce-view.js @@ -300,7 +300,7 @@ window.wp = window.wp || {}; self = this, frame, data; - data = window.decodeURIComponent( $( node ).data('wpview-text') ); + data = window.decodeURIComponent( $( node ).attr('data-wpview-text') ); frame = gallery.edit( data ); frame.state('gallery-edit').on( 'update', function( selection ) {