Skip to content

Event match changed to match events that contain any character excluding... #1158

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

ryakh
Copy link
Contributor

@ryakh ryakh commented Jan 3, 2014

Widget factory, while listening to events won't catch events that contain other characters than word characters in their names. Since it is becoming a common practice to use punctuation (mostly dots and colons) it would be nice to support any other than word characters in event names. Currently we are matching any word character (this group will act as an event) and separate it by a space character followed by any other character (to create a selector group). I propose to change the first matcher to any non space character since whitespace is used as a separator and thus it won't affect current behaviour but will add support for all other possible characters.

Issue found on stack overflow:
http://stackoverflow.com/questions/20598754/jquery-widget-on-method-and-rails-ajax-callbacks

@scottgonzalez
Copy link
Member

This is too broad. It's also impossible to have an event name with a period, as that would be a namespace. I'll accept a patch that adds colon and dash. You'll need to read http://contribute.jquery.org/commits-and-pull-requests/ to learn about our commit message style guide, file a ticket at http://bugs.jqueryui.com, sign our CLA, and add tests. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants