Link plugin fails when applied to a non-editable content
In link/dialogs/link.js:
var range = selection.getRanges( 1 )[ 0 ];
// Use link URL as text with a collapsed cursor.
if ( range.collapsed ) {
These lines cause problem, because ranges
is an empty array if only widget (non-editable content) is selected.
Change History (7)
Description: |
modified (diff)
|
Status: |
new →
confirmed
|
Summary: |
Link plugin fails when applied to non-editable content →
Link plugin fails when applied to a non-editable content
|
Owner: |
set to Piotrek Koszuliński
|
Status: |
confirmed →
assigned
|
Status: |
assigned →
review
|
Status: |
review →
review_passed
|
Resolution: |
→ fixed
|
Status: |
review_passed →
closed
|
I think that #10822 should go before this ticket. After we'll fix applying styles on non-editable elements, we will be able to just get a full range (currently only the editable part is extracted, which in case of widget selection is empty) from selection and apply link's style on it.