Opened 8 years ago

Last modified 8 years ago

#13694 review Bug

Link dialog removes onclick attribute

Reported by: Henning Owned by: kkrzton
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc:


Steps to reproduce

  1. go to CKEditor demo
  2. switch to source code mode
  3. remove the existing source
  4. enter
    <a href="" onclick="alert('onclick');" >my link with onclick</a>
  5. switch to wysiwyg mode
  6. doubleclick the link
  7. in the link dialog, click the OK button

Expected result

onclick attribute is preserved without change.

Actual result

onclick attribute is removed

Other details (browser, OS, CKEditor version, installed plugins)

I guess that CKEditor removes the onClick attribute because it might have been generated by CKEditor before via the Target option _<popup window>_. But CKEditors link dialog should remove the onClick only if the target option _<popup window>_ was set when the link dialog was opened.

Change History (3)

comment:1 Changed 8 years ago by Jakub Ś

Status: newconfirmed

Problem can be reproduced from CKEditor 3.0. If you insert the code and then edit the link using Link dialog, the onclick attribute is removed.

From what I have checked only the onclick is removed (tested with ACF disabled).

comment:2 Changed 8 years ago by kkrzton

Owner: set to kkrzton
Status: confirmedassigned

comment:3 Changed 8 years ago by kkrzton

Status: assignedreview

Changes in t/13694.

Added handling of user defined onclick attribute. Before it was always removed because of popup onlick handling.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy