Opened 9 years ago

Closed 9 years ago

#13067 closed Bug (invalid)

oncklick function called before button is inserted in textaera

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

Description

For testing purposes I created a "marktime" plugin. In steps it should do following:

  1. Click the "M" button in the toolbar
  2. Insert a button in the textarea at the cursor position
  3. Clicking the button in the textarea
  4. Pop up an alert with the current date (dummy function)

But what happens is following :

  1. Click the "M" button in the toolbar
  2. The alert pop up showing the date
  3. The button is inserted int the textarea
  4. Clicking the button in the textarea does nothing

Weird though, after inserting the source code shows this :

<p><input onclick="undefined" type="button" value="click me to get the time" /></p>

see also the attached plugin.js

No image "Step 1" attached to Ticket #13067 No image "Step 2" attached to Ticket #13067 No image "Source" attached to Ticket #13067

Attachments (4)

Step 1.png (46.0 KB) - added by Heinz 9 years ago.
Screenshot Step 1
Step 2.png (20.5 KB) - added by Heinz 9 years ago.
Screenshot Step 2
Source.png (23.4 KB) - added by Heinz 9 years ago.
Screenshot Source
marktime.zip (10.3 KB) - added by Heinz 9 years ago.
marktime.zip (plugin.js)

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Heinz

Attachment: Step 1.png added

Screenshot Step 1

Changed 9 years ago by Heinz

Attachment: Step 2.png added

Screenshot Step 2

Changed 9 years ago by Heinz

Attachment: Source.png added

Screenshot Source

Changed 9 years ago by Heinz

Attachment: marktime.zip added

marktime.zip (plugin.js)

comment:1 Changed 9 years ago by Piotrek Koszuliński

Resolution: invalid
Status: newclosed
Version: 4.4.7

I answered to your question on SO - http://stackoverflow.com/questions/29125473/input-onclick-function-not-called

tl;dr Your code is incorrect.

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