Opened 11 years ago

Last modified 9 years ago

#11227 confirmed Bug

dialog.validate.functions bugs

Reported by: Michael Johnson Owned by:
Priority: Normal Milestone:
Component: UI : Dialogs Version: 4.0
Keywords: HasPatch Cc:

Description (last modified by Jakub Ś)

The definition of the function returned from dialog.validate.functions suffers from two bugs.

  1. When obtaining the "value" from the arguments, the inner function should be referencing its own arguments, not those of the outer function.
  2. When calling functions, it should be using "call" and passing "this" so that other validation functions passed as arguments will have the item as "this" as they expect.

Attachments (1)

11227.patch (905 bytes) - added by Michael Johnson 11 years ago.
Patch to plugins.dialog.plugin.js

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by Michael Johnson

Attachment: 11227.patch added

Patch to plugins.dialog.plugin.js

comment:1 Changed 11 years ago by Michael Johnson

Component: GeneralUI : Dialogs
Version: 3.6.6 (SVN - trunk)

comment:2 Changed 9 years ago by Jakub Ś

Description: modified (diff)

comment:3 Changed 9 years ago by Jakub Ś

Status: newconfirmed
Version: 3.6.64.0

Same code is used in CKEditor 4.x.

  1. Perhaps it would be better to check both, arguments of inner and then outer function?
  2. Looks like it would give better flexibility to validate functions.

@dnetmj, perhaps you could provide this fix as a pull request for CKEditor 4.x? You could submit it to ckeditor-dev

If you decide to do so, please don't forget to describe it exactly or write which bug it fixes. Please also read http://docs.ckeditor.com/#!/guide/dev_contributing_code as tests are required for pull requests.

Version 0, edited 9 years ago by Jakub Ś (next)
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