Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKEDITOR.plugins.link.getSelectedLink does not fetch all links #936

Merged
merged 8 commits into from
Dec 15, 2017

Conversation

wojtekw92
Copy link
Contributor

@wojtekw92 wojtekw92 commented Sep 19, 2017

What is the purpose of this pull request?

Bug fix

Does your PR contain necessary tests?

All patches which change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.

This PR contains

  • Unit tests
  • Manual tests

What changes did you make?

Fix double click on anchor with image and text.

closes #859

@mlewand mlewand requested a review from Comandeer October 6, 2017 10:27
@Comandeer Comandeer changed the title T/859 CKEDITOR.plugins.link.getSelectedLink does not fetch all links Oct 6, 2017
Copy link
Member

@Comandeer Comandeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one case that it's still not working:

<table border="1" cellpadding="1" cellspacing="1" style="width:500px">
	<tbody>
		<tr>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td><a href="http://gagahahahahah"><img alt="" src="https://www.comandeer.pl/images/custom/comandeer.jpg" style="height:96px; width:96px" />hahahahahahah</a></td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>
	</tbody>
</table>

In that case double clicking the link does not fetch it.

1. Right-click on the span ("some button text") and select "Edit Link".

**Expected:**
* Link should have class `someClass`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Class described here is not the same as the class used inside the code.

</div>

<script>
CKEDITOR.replace( 'editor' /*,{ allowedContent: true }*/);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commented code should be deleted.

bot.editor.getSelection().selectElement( editable.findOne( 'a' ) );

bot.dialog( 'link', function( dialog ) {
assert.areSame( dialog.getValueOf( 'info', 'url' ), 'linkUrl' );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to close the dialog after the test.

@wojtekw92
Copy link
Contributor Author

I was not able to reproduce this issue with table. The table is now available in manual test. @Comandeer please check this again to confirm.

Copy link
Member

@Comandeer Comandeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

However we'll have to wait with merge to release of 4.8.0 and then this branch will be merged to major/master.

@Comandeer Comandeer changed the base branch from major to master December 15, 2017 10:54
@Comandeer Comandeer merged commit 79e7ebe into master Dec 15, 2017
@Comandeer Comandeer deleted the t/859 branch December 15, 2017 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants