Opened 9 years ago
Closed 9 years ago
#14506 closed Bug (wontfix)
IE: Cursor moves outside of the anchor when space is entered
Reported by: | Irina | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | IBM | Cc: |
Description
Steps to reproduce
- Insert following into the console tab in the dev tools:
CKEDITOR.instances.editor.document.on("keypress", function(ev){ var key = ev.data.getKey(); if (key == 64) { // '@' ev.data.preventDefault(); CKEDITOR.instances.editor.insertHtml('<a href="">@</a>'); } })
- Input some text in the instance of the ckeditor such as "hey @amy jones"
- In the console you can see how "@amy" is within the anchor element whereas "jones" was moved outside.
Expected result
The "jones" should be appearing in blue as part of the link.
Actual result
The "jones" gets moved outside of the link.
Other details (browser, OS, CKEditor version, installed plugins)
Tested in IE11 & MS Edge.
Note: you might need to disable automatic hyperlinking in IE11 for testing.
Change History (5)
comment:1 Changed 9 years ago by
Version: | 4.5.7 → 4.5.6 |
---|
comment:2 Changed 9 years ago by
Keywords: | IBM added |
---|
comment:3 Changed 9 years ago by
Status: | new → pending |
---|---|
Version: | 4.5.6 |
comment:4 Changed 9 years ago by
Currently we are working on an improvement for link (#11277, #12151, #7154) which should separate text from href. When you however autolink like that, anyone’s guess would probably be that href is the same as text and that you can't separate these two. Assuming that guess is correct (and this is the most reasonable approach in this case IMO) then we should not allow any spaces in text/href and IE is correct here.
comment:5 Changed 9 years ago by
Resolution: | → wontfix |
---|---|
Status: | pending → closed |
Unfortunately this is non-standard, default implementation for every vendor.
With webkit based browsers it's impossible (without hacking) to place the selection at the end of <a>
element (https://bugs.chromium.org/p/chromium/issues/detail?id=588418 and https://bugs.webkit.org/show_bug.cgi?id=154496).
Currently the best implementation is in Firefox. You should be able to put space inside a link while typing, as you might simply want to put some semantic inner text instead of just an URL.
That being said, there's little we can do without browser vendor fixes.
Code I have used:
Results:(I got same results by applying inline link style from code)
IE11:
<p><a href="">@amy</a> jones</p>
- space breaks linkChrome:
<p><a href="">@</a>amy jones</p>
- only@
gets linkedFirefox:
<p><a href="">@amy jones test</a></p>
- there is no way to leave a link with spaceWe have 3 different results. Which is correct? Anyone?
Perhaps there should be some other fourth workflow here?