I tried clicking a proposed username to add an @mention in between two existing words (that is, while inserting text into existing text, not while typing at the end of a paragraph as normally).

This resulted in anything from the @username until the end of the current paragraph to be replaced with the linked username that I clicked. It leads to loss of text, but fortunately this can be undone with the Ctrl + Z undo feature of CKEditor.

(Issue observed with CKEditor 4.3.2 in Firefox 28.0 on Ubuntu 13.10.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tanius’s picture

Issue summary: View changes
askibinski’s picture

Status: Active » Postponed (maintainer needs more info)

Yes there are a lot of weird edge-case scenario's...

Could you perhaps tell me if the same thing happens in other browsers, especially Chrome and IE?

tanius’s picture

Title: Clicking a proposed username replaces text until end of paragraph » Clicking a proposed username replaces text until next mention or end of paragraph
Status: Postponed (maintainer needs more info) » Active

Thank you for the fast answer! I did some tests with all browsers that I had around: the above issue happened in all of them, namely:

  • Firefox 28.0 on Ubuntu Linux 13.10 (as in the original report)
  • Firefox 28.0 on Windows XP SP3
  • Firefox 23.0.1 on Windows XP SP3
  • Safari 7.0.3 on OS X
  • Chrome / Chromium Version 33.0.1750.152 on Ubuntu Linux 13.10
  • Internet Explorer 8.0 on Windows XP SP3: suggestions do not appear at all. Old browser, safely ignored.

In all cases, this used CKEditor 4.3.2.

Another interesting twist: If the current paragraph, somewhere after the position where one is typing to insert a mention, already contains a mention, this existing mention is the stop position up to which text is replaced. It's not alway up to the end of the paragraph – I have updated the issue title accordingly.

askibinski’s picture

Yep, you are right.

Unfortunately, I don't think I will be able to dive into this anytime soon. Patches are welcome though ;)

7gipsy’s picture

Hi guys,

Thanks for your work on this project.
Let me purpose you a patch for this issue.

  • askibinski committed f03cbbc on 7.x-1.x
    Issue #2227509 by 7gipsy: Clicking a proposed username replaces text...
askibinski’s picture

Status: Active » Closed (fixed)

Thanks for the patch 7gipsy! Tested and it works. Conmitted to -dev. I will also release an 1.3 version.
http://cgit.drupalcode.org/ckeditor_mentions/commit/?id=f03cbbc