Opened 13 years ago

Closed 13 years ago

#11727 closed Bug (fixed)

Editor tries to select non-editable image which was clicked

Reported by: Piotrek Koszuliński Owned by: Piotrek Koszuliński
Priority: Normal Milestone: CKEditor 4.4.0
Component: General Version:
Keywords: Cc:

Description

​https://github.com/ckeditor/ckeditor-dev/blob/aed915e8f79a1d1d2208fae38e33130f265a76d5/core/editable.js#L743-L751

This causes an issue in #11480 on Firefox because editor tries to create selection on widget's mask which is placed inside widget wrapper. This somehow does not cause any visible problems on in other cases, but in this one fixDom steps into the process and adds bogus BR inside the wrapper.

I set milestone to 4.4, because this ticket may have unexpected influence on MathJax and Image2 plugins.

Change History (4)

comment:1 Changed 13 years ago by Piotrek Koszuliński

Status: new → confirmed

comment:2 Changed 13 years ago by Piotrek Koszuliński

Owner: set to Piotrek Koszuliński
Status: confirmed → review

Pushed ​branch:t/11727 on dev and tests.

comment:3 Changed 13 years ago by Olek Nowodziński

Status: review → review_passed

The following code

'async:init': function() {
	var that = this;

	CKTESTER.tools.setUpEditors( {
		editor: {
			name: 'editor1',
			creator: 'inline',
			config: {
				allowedContent: true
			}
		},
	}, function( editors, bots ) {
		that.editorBots = bots;
		that.editors = editors;
		that.callback();
	} );
},

is not necessary since there's just single editor instance used in tests.

Other than that, this fix feels good to me.

comment:4 Changed 13 years ago by Piotrek Koszuliński

Resolution: → fixed
Status: review_passed → closed

Fixed on major with ​git:894f26f on dev and c068298 on tests.

I used 'async:init' because there may be more editors in the future. I was recently forced to refactor few test files because they were using CKTESTER.editor instead of this method, so I think that it's reasonable to use now this method only. It's just a lot more flexible.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy