Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#9955 closed Bug (invalid)

Auto Hyperlink Issue on Email - Sometimes does not update properly

Reported by: Rick Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: Cc:

Description

When I type in an email address in CKEditor on IE9, it will automatically create a hyperlink. When I change the email address, it will sometimes update the hyperlink. It has come to my attention that it doesn't always update the hyperlink, though. This has caused problems when users edit an email address before sending. The recipient will see the correct email address, but will get the wrong email address when they click the link.

I've been able to replicate it on about 5% of my attempts. I am most successful when making the change and then hitting submit right away.

This is unrelated to the other issues I've seen. There are other requests to allow us to remove auto hyperlinking via config. I hope that is offered soon as it would be a sufficient workaround for myself.

Change History (7)

comment:1 Changed 6 years ago by Jakub Ś

Keywords: Hyperlink removed
Status: newpending

I am most successful when making the change and then hitting submit right away.

This is not the way to reproduce the problem. In such cases it is possible that you send data before it actually was updated.

Could you tell me:

  1. Is there a way to reproduce this problem in editor but without submitting?
  2. What it the stp by step scenario? Could you tell me what email you type, what do you change it to, how long do you wait, do you switch to source mode etc.
  3. What method do you use to submit data? This should be one of two below. I'm asking because this might be problem in your submit method and not editor.

update content of this textarea by calling editor.updateElement() get data directly from editor instance by editor.getData()

Could you please reply to above questions?

There are other requests to allow us to remove auto hyperlinking via config

This is IE feature and unfortunately can't be turned off.

comment:2 Changed 6 years ago by Rick

I just tried it without submitting...

I type in an email address. When I hit space right after the email address, it becomes a hyperlink. Now I click on "Source" and see the link matches.

I go back to the designer and hit the backspace on one of the characters of the email address. I click Source again and see that the hyperlink now does not match.

P.S.: Many times I do not want hyperlinks to be created. Hyperlinks change formatting. If I am building a printable document, I might not want certain words to be underlined and blue. Could the request to have a config setting that disables the auto-hyperlink.

comment:3 Changed 6 years ago by Jakub Ś

Resolution: invalid
Status: pendingclosed

I go back to the designer and hit the backspace on one of the characters of the email address. I click Source again and see that the hyperlink now does not match.

This is not how it works.
When you create a link without selecting any text e.g. test@… you get test@… in href attribute and between “a” tags. The second is just text that represents link. When you make changes in WYSIWYG mode you actually change text that represents link.
To change href attribute you have to e.g. double-click on link or click an use link toolbar button.

Please note that these two things are treated separately. This is because in most cases text you select is different than URL (e.g. text "see more..." gets linked).
To gt both things changed you have to modify text and href separately.


Many times I do not want hyperlinks to be created.

Like I have told you before this is IE feature. Browser does this by default and what is worse it doesn't provide any handles to disable this behaviour.
There is simply nothing we can do about it.

comment:4 Changed 6 years ago by Rick

I found a solution to disable automatic hyperlinks:

document.execCommand("AutoUrlDetect", false, false);

I've tested it and it works. It should be sufficient to solve my issues.

Last edited 6 years ago by Rick (previous) (diff)

comment:5 Changed 6 years ago by Jakub Ś

You are right:) I have completely forgotten about it.

Code document.execCommand("AutoUrlDetect", false, false) is the way to go but please remember that it Doesn't work in IE6-8. It was introduced in IE9. My answer should be – there is no solution for IE6-8 – sorry for that.

comment:6 Changed 6 years ago by Rick

Question:

Would it be possible to add this as a configurable feature:

If the link is of type "mailto" and the text is a valid email address then update the mailto link to match the email address. This would help prevent the issue where the two don't match.

It would help lessen the chance of the issue in question, where sometimes the link updates on edit and sometimes it doesn't.

I can't think of a scenario where the text is a valid email address and the link points to another "mailto". If this was a configurable setting, then we developers can make the choice whether to turn on that feature or not.

comment:7 Changed 6 years ago by Jakub Ś

@riznick I have reported this feature in #9973. If you have anything to add please do it in that ticket.

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