Skip to content

Core: register validateDelegate also for checkables on focusin, focusout... #1065

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

Closed
wants to merge 1 commit into from

Conversation

staabm
Copy link
Member

@staabm staabm commented Apr 1, 2014

... and keyup. fixes #1062.

@staabm
Copy link
Member Author

staabm commented Apr 9, 2014

@jzaefferer any feedback?

edit: never mind, disussion takes places in the linked issue #1062

@jzaefferer
Copy link
Collaborator

Yeah, might as well have asked that here. Let's stick with the PR for less confusion.

Based on your feedback, could you add a test that involves the elements and events you're interested in? Will help prevent future regressions. Thanks.

@staabm
Copy link
Member Author

staabm commented Apr 28, 2014

@jzaefferer added tests.

hardest part was getting the whitespaces right... my editor and I are more used to spaces, instead of tabs ;-)

@staabm
Copy link
Member Author

staabm commented Apr 28, 2014

(off-topic) the codestyle checker on travis did not throw an error because of the tabs / spaces mix I had at first..

var input, i, events, triggeredEvents = 0;

$("#form").validate({
debug: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this have to be here?

Copy link
Member Author

Choose a reason for hiding this comment

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

copied from a test in this file, was not sure if it is required or why it was actually their.

@staabm
Copy link
Member Author

staabm commented Apr 29, 2014

@jzaefferer adjusted per your feedback. everything still green

commit messages adjusted, hopefully in a correct way ;-).

"focusin focusout keyup", delegate)
.validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate);
.validateDelegate("option", "click", delegate);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you test that handling the click on option elements actually works consistently? If not, this might cause a regression.

Copy link
Member Author

Choose a reason for hiding this comment

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

I need to check that...

Copy link
Member Author

Choose a reason for hiding this comment

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

@jzaefferer I did not change handling of option elements or the even listeners on them... do you think it didn't work correctly before my change?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You removed click events on selects. I don't know if handling clicks on options is good enough to justify that change. I may have known before, since I likely wrote the code, but its been between 4 to 8 years ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

@jzaefferer had a few minutes to test it... select with click is required for IE <= 8 (tested by switching document-mode in the dev-tools of IE11). Even in Chrome 35 it is required.

In FF it works without it.

@jzaefferer
Copy link
Collaborator

Tests are looking good now, thanks.

@staabm
Copy link
Member Author

staabm commented May 5, 2014

adjusted the PR accordingly. ready to land.

@staabm
Copy link
Member Author

staabm commented May 20, 2014

@jzaefferer any news here?

@staabm staabm closed this in d319a0d May 20, 2014
@jzaefferer
Copy link
Collaborator

Thanks for the reminder. Landed with an updated commit message.

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.

validateDelegate not registered on focusin, focusout and keyup for checkables
2 participants