Opened 9 years ago

Closed 6 years ago

#6624 closed Bug (fixed)

[Opera] broken unlink

Reported by: Martin Owned by:
Priority: Must have (possibly next milestone) Milestone:
Component: General Version: 3.0
Keywords: Opera Cc: garryyao, Hallvord R. M. Steen (Opera Software), spgard, satya_minnekanti@…, matti.jarvinen@…

Description

  1. Open empty editor
  2. Create list with some list items
  3. Select all list and create link from selection
  4. Unselect all and select only one list item. Try unlink them

Expected Result:
Selected item is unlinked

Actual Result:
Selected item can not be unlinked

Attachments (1)

bug_reproduction.avi (989.0 KB) - added by Martin 9 years ago.

Download all attachments as: .zip

Change History (17)

Changed 9 years ago by Martin

Attachment: bug_reproduction.avi added

comment:1 Changed 9 years ago by Martin

Version: 3.0

comment:2 Changed 9 years ago by Garry Yao

Status: newconfirmed
Summary: Can not unlink list item[Opera] broken unlink

It's even not related to list, simply loading the following html and unlink fails:

<a href="ckeditor.com">link</a>

comment:3 Changed 8 years ago by Hallvord R. M. Steen (Opera Software)

If selection (or cursor) is *inside* the link, unlink works fine. If the entire link text is already selected, unlink fails.

comment:4 Changed 8 years ago by Hallvord R. M. Steen (Opera Software)

Cc: garryyao Hallvord R. M. Steen (Opera Software) added

comment:5 Changed 8 years ago by Hallvord R. M. Steen (Opera Software)

Priority: NormalHigh

comment:6 in reply to:  3 Changed 8 years ago by Garry Yao

Replying to hallvord@…:

If selection (or cursor) is *inside* the link, unlink works fine. If the entire link text is already selected, unlink fails.

It should be an update for Opera 11.10.

comment:7 Changed 8 years ago by Hallvord R. M. Steen (Opera Software)

Good news is that this seems to work a lot better in internal builds. Both putting the cursor inside the link and clicking 'unlink' and selecting the whole link works fine.

What still doesn't seem to work is selecting parts of a link. In Opera, unlink does nothing, in Chrome it removes the entire link. IMO the behaviour the user would expect would probably be clearing the link formatting for the selected text only.

comment:8 in reply to:  7 Changed 8 years ago by Frederico Caldeira Knabben

Replying to hallvord@…:

What still doesn't seem to work is selecting parts of a link. In Opera, unlink does nothing, in Chrome it removes the entire link. IMO the behaviour the user would expect would probably be clearing the link formatting for the selected text only.

This seems to be controlled by CKEditor. I think the best Opera can do here is replicating the behavior of other browsers when calling execCommand('unlink').

comment:9 Changed 8 years ago by Hallvord R. M. Steen (Opera Software)

OK, if you actually use execCommand here I'll have a look at that ;-). I've noticed that you tend not to use execCommand and prefer to do the heavy lifting yourself..

comment:10 Changed 8 years ago by Frederico Caldeira Knabben

That's definitely true for us. In fact we tried avoiding execCommand here as well, but we hit a Firefox bug (oh, these browsers!):
browser:CKEditor/trunk/_source/plugins/link/plugin.js#L209

I'm not sure this FF issue is still valid, but that's what we have for now. We'll probably replace that code sooner or later.

So, if you're focused on the CKEditor issue only for now, just be sure that CKEditor behaves in the same way in all browsers and you'll be ok, leaving the execCommand thing aside.

comment:11 Changed 8 years ago by Frederico Caldeira Knabben

Cc: spgard added

#7715 has been marked as DUP.

comment:12 Changed 8 years ago by Satya Minnekanti

Cc: satya_minnekanti@… added

comment:13 Changed 8 years ago by Hallvord R. M. Steen (Opera Software)

I notice that CKEditor seems to insert hidden SPAN tags at the active end of the selection each time I try to use the unlink button with Opera.

Reproduce: load editor with normal sample text. Select the part "Edit" inside the "CKEditor" link. Click "Unlink", then "Source".

Bug: source contains

CK<span style="display: none">&nbsp;</span>Edit<span style="display: none">&nbsp;</span>or

This doesn't happen in Firefox or Chrome. Neither does it happen if I simply run the bookmarklet javascript:alert(frames[0].document.execCommand('unlink')); instead of using CKEditor's unlink button. Hence I think this bug is on your side.

comment:14 Changed 8 years ago by Matti Järvinen

Cc: matti.jarvinen@… added

comment:15 Changed 6 years ago by Piotrek Koszuliński

I wasn't able to reproduce it on 4.0.

comment:16 Changed 6 years ago by Jakub Ś

Resolution: fixed
Status: confirmedclosed

Yes, unlinking works now in CKEditor 4.x and what is more it also works in CKEditor 3.6.5.

Seems Opera guys have done pretty good job lately :) This is another one fixed from long term bugs list.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy