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 )
The definition of the function returned from dialog.validate.functions suffers from two bugs.
- When obtaining the "value" from the arguments, the inner function should be referencing its own arguments, not those of the outer function.
- 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)
Change History (4)
Changed 11 years ago by
Attachment: | 11227.patch added |
---|
comment:1 Changed 11 years ago by
Component: | General → UI : Dialogs |
---|---|
Version: | → 3.6.6 (SVN - trunk) |
comment:2 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 9 years ago by
Status: | new → confirmed |
---|---|
Version: | 3.6.6 → 4.0 |
Same code is used in CKEditor 4.x.
- Perhaps it would be better to check both, arguments of inner and then outer function?
- Looks like it would give better flexibility to validate functions.
@dnetmj, could I as you to provide this fix as a pull request for CKEditor 4.x? 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 exactly what or which bug this pull request fixes. Because tests are required, please also see http://docs.ckeditor.com/#!/guide/dev_contributing_code.
Patch to plugins.dialog.plugin.js