Skip to content

Commit 2849cd0

Browse files
committed
Merge branch 't/10851' into major
2 parents e49980f + 6742acc commit 2849cd0

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

plugins/image2/dialogs/image2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ CKEDITOR.dialog.add( 'image2', function( editor ) {
283283
},
284284
onShow: function() {
285285
// Create a "global" reference to edited widget.
286-
widget = this._.widget;
286+
widget = this.widget;
287287

288288
// Create a "global" reference to widget's image.
289289
image = widget.parts.image;

plugins/image2/plugin.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@
236236
this.on( 'contextMenu', function( evt ) {
237237
evt.data.image2 = CKEDITOR.TRISTATE_OFF;
238238
} );
239+
240+
// Pass the reference to this widget to the dialog.
241+
this.on( 'dialog', function( evt ) {
242+
evt.data.widget = this;
243+
}, this );
239244
},
240245

241246
upcast: upcastWidgetElement,

plugins/widget/plugin.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -902,9 +902,6 @@
902902
if ( !that.fire( 'dialog', dialog ) )
903903
return;
904904

905-
// Make widget accessible beyond setup and commit.
906-
dialog._.widget = that;
907-
908905
showListener = dialog.on( 'show', function() {
909906
dialog.setupContent( that );
910907
} );

0 commit comments

Comments
 (0)