Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for: table dialog validator fails when function getValue is defined in global scope #2652

Merged
merged 4 commits into from Dec 17, 2018

Conversation

engineering-this
Copy link
Contributor

What is the purpose of this pull request?

Bug fix

Does your PR contain necessary tests?

All patches which change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.

This PR contains

  • Unit tests
  • Manual tests

What changes did you make?

As dialog.validate methods are defined to be used with proper context I've updated validatorNum helper in table dialog.

Closes #2650

@Comandeer Comandeer self-requested a review December 5, 2018 16:45
@Comandeer Comandeer self-assigned this Dec 5, 2018
@Comandeer Comandeer self-assigned this Dec 5, 2018
Copy link
Member

@Comandeer Comandeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix works correctly, but I doubt if validatorNum function is needed at all. Directly calling CKEDITOR.dialog.validate.integer seems to also does the trick. Maybe we can simplify the code?

@engineering-this
Copy link
Contributor Author

Removed validatorNum, it seems to work ok.

Copy link
Member

@Comandeer Comandeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I've restored the previous version, because at the end CKEDITOR.dialog.validate.integer seems to change the behaviour of the field.

@Comandeer Comandeer merged commit cbf772d into master Dec 17, 2018
@CKEditorBot CKEditorBot deleted the t/2650 branch December 17, 2018 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants