|
@@ -208,7 +208,7 @@ export default class ImageUploadPanelView extends View {
|
|
|
// Intercept the "selectstart" event, which is blocked by default because of the default behavior
|
|
// Intercept the "selectstart" event, which is blocked by default because of the default behavior
|
|
|
// of the DropdownView#panelView.
|
|
// of the DropdownView#panelView.
|
|
|
// TODO: blocking "selectstart" in the #panelView should be configurable per–drop–down instance.
|
|
// TODO: blocking "selectstart" in the #panelView should be configurable per–drop–down instance.
|
|
|
- this.listenTo( this.labeledInputView.fieldView.element, 'selectstart', ( evt, domEvt ) => {
|
|
|
|
|
|
|
+ this.listenTo( this.labeledInputView.element, 'selectstart', ( evt, domEvt ) => {
|
|
|
domEvt.stopPropagation();
|
|
domEvt.stopPropagation();
|
|
|
}, { priority: 'high' } );
|
|
}, { priority: 'high' } );
|
|
|
}
|
|
}
|
|
@@ -216,6 +216,8 @@ export default class ImageUploadPanelView extends View {
|
|
|
/**
|
|
/**
|
|
|
* Creates labeled field view.
|
|
* Creates labeled field view.
|
|
|
*
|
|
*
|
|
|
|
|
+ * @param {module:utils/locale~Locale} locale The localization services instance.
|
|
|
|
|
+ *
|
|
|
* @private
|
|
* @private
|
|
|
* @returns {module:ui/labeledfield/labeledfieldview~LabeledFieldView}
|
|
* @returns {module:ui/labeledfield/labeledfieldview~LabeledFieldView}
|
|
|
*/
|
|
*/
|
|
@@ -226,11 +228,12 @@ export default class ImageUploadPanelView extends View {
|
|
|
labeledInputView.set( {
|
|
labeledInputView.set( {
|
|
|
label: t( 'Insert image via URL' )
|
|
label: t( 'Insert image via URL' )
|
|
|
} );
|
|
} );
|
|
|
- labeledInputView.fieldView.placeholder = t( 'Image source URL...' );
|
|
|
|
|
- labeledInputView.fieldView.bind( 'value' ).to( this, 'imageURLInputValue' );
|
|
|
|
|
|
|
+ labeledInputView.fieldView.placeholder = t( 'https://example.com/src/image.png' );
|
|
|
|
|
+ labeledInputView.infoText = t( 'Paste the image source URL' );
|
|
|
|
|
+ labeledInputView.fieldView.bind( 'value' ).to( this, 'imageURLInputValue', value => value || '' );
|
|
|
|
|
|
|
|
- labeledInputView.fieldView.on( 'input', ( evtInfo, evtData ) => {
|
|
|
|
|
- this.imageURLInputValue = evtData.target.value;
|
|
|
|
|
|
|
+ labeledInputView.fieldView.on( 'input', () => {
|
|
|
|
|
+ this.imageURLInputValue = labeledInputView.fieldView.element.value;
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
return labeledInputView;
|
|
return labeledInputView;
|
|
@@ -239,6 +242,8 @@ export default class ImageUploadPanelView extends View {
|
|
|
/**
|
|
/**
|
|
|
* Creates dropdown view.
|
|
* Creates dropdown view.
|
|
|
*
|
|
*
|
|
|
|
|
+ * @param {module:utils/locale~Locale} locale The localization services instance.
|
|
|
|
|
+ *
|
|
|
* @private
|
|
* @private
|
|
|
* @returns {module:ui/dropdown/dropdownview~DropdownView}
|
|
* @returns {module:ui/dropdown/dropdownview~DropdownView}
|
|
|
*/
|
|
*/
|
|
@@ -269,6 +274,8 @@ export default class ImageUploadPanelView extends View {
|
|
|
* * {@link #insertButtonView},
|
|
* * {@link #insertButtonView},
|
|
|
* * {@link #cancelButtonView}.
|
|
* * {@link #cancelButtonView}.
|
|
|
*
|
|
*
|
|
|
|
|
+ * @param {module:utils/locale~Locale} locale The localization services instance.
|
|
|
|
|
+ *
|
|
|
* @private
|
|
* @private
|
|
|
* @returns {Object.<String,module:ui/view~View>}
|
|
* @returns {Object.<String,module:ui/view~View>}
|
|
|
*/
|
|
*/
|