diff --git src/wp-admin/js/widgets/text-widgets.js src/wp-admin/js/widgets/text-widgets.js
index 2108b65548..240b54f566 100644
|
|
wp.textWidgets = ( function( $ ) { |
184 | 184 | }, updateWidgetBuffer ); |
185 | 185 | } |
186 | 186 | |
187 | | editor.save(); |
| 187 | editor.save({ no_events: true }); // Arg no_events to prevent infinite SaveContent loop. |
188 | 188 | textarea.trigger( 'change' ); |
189 | 189 | } |
190 | 190 | }; |
… |
… |
wp.textWidgets = ( function( $ ) { |
192 | 192 | control.editorFocused = true; |
193 | 193 | }); |
194 | 194 | editor.on( 'NodeChange', _.debounce( triggerChangeIfDirty, changeDebounceDelay ) ); |
195 | | editor.on( 'blur', function() { |
| 195 | |
| 196 | /* |
| 197 | * Note that originally the 'blur' event was used below. It had to be |
| 198 | * replaced with 'SaveContent' because the 'blur' event does not trigger |
| 199 | * when the user switches to the Text tab. |
| 200 | */ |
| 201 | editor.on( 'SaveContent', function() { |
196 | 202 | control.editorFocused = false; |
197 | 203 | triggerChangeIfDirty(); |
198 | 204 | }); |