Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 't/11533'
  • Loading branch information
oleq committed Feb 5, 2014
2 parents 9a2e1a3 + 05488a1 commit fff2039
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -12,6 +12,7 @@ Fixed Issues:
* [#11359](http://dev.ckeditor.com/ticket/11359): Standardized the way anchors are discovered by the [Link](http://ckeditor.com/addon/link) dialog.
* [#11058](http://dev.ckeditor.com/ticket/11058): [IE8] Fixed: Error when deleting a row.
* [#11508](http://dev.ckeditor.com/ticket/11508): Fixed: htmlDataProcessor discovering protected attributes within other attributes' values.
* [#11533](http://dev.ckeditor.com/ticket/11533): Widgets: Avoid recurring upcasts if DOM structure was modified during an upcast.

## CKEditor 4.3.2

Expand Down
6 changes: 6 additions & 0 deletions plugins/widget/plugin.js
Expand Up @@ -1656,6 +1656,11 @@
return false;
}
else if ( ( upcastsLength = upcasts.length ) ) {
// Ignore elements with data-cke-widget-upcasted to avoid multiple upcasts (#11533).
// Do not iterate over descendants.
if ( element.attributes[ 'data-cke-widget-upcasted' ] )
return false;

// Check element with upcast callbacks first.
// If any of them return false abort upcasting.
for ( i = 0, upcastCallbacksLength = upcastCallbacks.length; i < upcastCallbacksLength; ++i ) {
Expand All @@ -1677,6 +1682,7 @@

// Set initial data attr with data from upcast method.
element.attributes[ 'data-cke-widget-data' ] = JSON.stringify( data );
element.attributes[ 'data-cke-widget-upcasted' ] = 1;

toBeWrapped.push( [ element, upcast[ 1 ] ] );

Expand Down

0 comments on commit fff2039

Please sign in to comment.