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

Remove unnecessary code that breaks jQuery 3 #318

Merged
merged 4 commits into from
Nov 9, 2016
Merged

Remove unnecessary code that breaks jQuery 3 #318

merged 4 commits into from
Nov 9, 2016

Conversation

stefanor
Copy link
Member

@stefanor stefanor commented Nov 9, 2016

event.props was removed in jquery 3 (jquery/api.jquery.com#405).

It looks like this wasn't doing anything useful, and broke the schedule
editor.

event.props was removed in jquery 3 (jquery/api.jquery.com#405).

It looks like this wasn't doing anything useful, and broke the schedule
editor.
It is not present in modern Firefox. Use the event argument we got.
Copy link
Member

@hodgestar hodgestar left a comment

Choose a reason for hiding this comment

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

Left a couple of questions, but looks good to me.

if (e.stopPropagation) {
e.stopPropagation(); // stops the browser from redirecting.
}
e.preventDefault(); // stops the browser from redirecting

var slot = e.target.getAttribute('data-slot');
var venue = e.target.getAttribute('data-venue');

//noinspection JSUnresolvedVariable
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove this comment now?

Any idea how the event. references worked before? Some sort of crazy magic?

Copy link
Member Author

Choose a reason for hiding this comment

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

Apparently it's a legacy thing: http://stackoverflow.com/a/20522980

Copy link
Member

Choose a reason for hiding this comment

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

Cool. Let's remove the noinspection then.

Not sure what they were used for, the Internet says IntilliJ.

Add a JSHint/JSLint declaration of used globals.
@hodgestar
Copy link
Member

👍

@stefanor stefanor merged commit 822f8ac into master Nov 9, 2016
@stefanor stefanor deleted the jquery-3 branch November 9, 2016 15:09
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.

2 participants