Problem/Motivation

Start
<a href="foobar">One Two Three</a>
Edit
Select Three, and type Four.
Expected
<a href="foobar">One Two Four</a>
Actual
<a href="foobar">One Two F</a>our

Proposed resolution

TBD, blocked on CKEditor.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#6 quick-edit-issue.gif3.51 MBBcwald
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Bcwald created an issue. See original summary.

Wim Leers’s picture

Issue summary: View changes

Please upload the screencast as an attachment to this issue. Those Dropbox links will stop working eventually.

Wim Leers’s picture

Title: Quick edit does not work with anchor tags that have href attribute value of "#" » CKEditor <a> text selection logic: select any subset at the end of the link text, start typing, only the first typed character is part of the link text
Component: quickedit.module » ckeditor.module
Priority: Normal » Minor
Issue tags: +Needs upstream bugfix

Also, this is not at all Quick Edit-specific. This is just CKEditor behavior.

Also, this is not at all related to <a href="#">just empty anchor</a> links. You can reproduce it with ANY link.

This is an edge case of CKEditor's selection logic: as soon as you type one character, it considers that the end of the <a>'s content, and hence it puts subsequent characters outside of the <a>.

Wim Leers’s picture

Start
<a href="foobar">One Two Three</a>
Edit
Select Three, and type Four.
Expected
<a href="foobar">One Two Four</a>
Actual
<a href="foobar">One Two F</a>our
Wim Leers’s picture

For a moment, I thought it was a bug in drupallink (Drupal 8's own link plugin), but it's actually a bug in CKEditor's official link as well, because I can easily reproduce this at http://ckeditor.com/demo also.

Bcwald’s picture

FileSize
3.51 MB
Bcwald’s picture

I too can replicate it on any link, so long as I start with the last character in the link. For example:

<a href="#">Test link</a>

adding anything after the K breaks. or if I delete a word and start at the end.

But if I were to start typing at the beginning or middle, say I add "Another" between Test and LInk, it works fine.

Bcwald’s picture

Issue summary: View changes
Wim Leers’s picture

#6: Thanks!

#7: yep.

Now blocked on feedback from the CKEditor team. I pinged them.

I also cross-posted this to Backdrop's issue queue: https://github.com/backdrop/backdrop-issues/issues/1631 (we have a great working relationship with them wrt CKEditor-related issues).

Wim Leers’s picture

Issue summary: View changes
mlewand’s picture

That's interesting couple of notes:

  1. It's blink specific, can't reproduce it with FF, IE11 (might be for webkit, currently I don't have any mac by my hand to check it, so if any1 can check webkit that would be great!).
  2. it's a native implementation bug - you can reproduce it with a plain contenteditable demo.

So it should be reported to Chromium team. It's to be determined whether it's a WebKit issue, if so we should also report it to their bugzilla.

Wim Leers’s picture

Title: CKEditor <a> text selection logic: select any subset at the end of the link text, start typing, only the first typed character is part of the link text » [WebKit][Blink] contentEditable <a> text selection logic broken: select any subset at the end of the link text, start typing, only the first typed character is part of the link text

Yep, also happens in WebKit. At least in Safari 9.0.3.

Could you report this to both browser vendors? You have much more experience with that.

Bcwald’s picture

Confirmed. It is happening on WebKit mac for me. Chrome/Safari.

I also confirmed this issue does *not* happen on FF.

Appears you are correct that it's a Webkit specific issue.

Wim Leers’s picture

Issue tags: +browser
mlewand’s picture

There you go, reported to both Chromium and Webkit teams.

Wim Leers’s picture

Status: Active » Postponed

Thanks!

Wim Leers’s picture

Title: [WebKit][Blink] contentEditable <a> text selection logic broken: select any subset at the end of the link text, start typing, only the first typed character is part of the link text » [upstream][WebKit][Blink] contentEditable <a> text selection logic broken: select any subset at the end of the link text, start typing, only the first typed character is part of the link text

Adding [upstream] prefix so it's visually clear when looking at the list of open issues which ones we cannot actually fix.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Project: Drupal core » CKEditor 4 - WYSIWYG HTML editor
Version: 9.4.x-dev » 1.0.x-dev
Component: ckeditor.module » Code

CKEditor has been removed from core, CKEditor 4 is removed from Drupal Core in 10.0.0