8000 Replace javascript:void(0) with # by pfiller · Pull Request #1377 · harvesthq/chosen · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Replace javascript:void(0) with # #1377

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

Merged
merged 2 commits into from
Jul 24, 2013
Merged

Replace javascript:void(0) with # #1377

merged 2 commits into from
Jul 24, 2013

Conversation

pfiller
Copy link
Contributor
@pfiller pfiller commented Jul 19, 2013

@kenearley @stof @koenpunt

Fixes:

We don't need to add a preventDefault because all clicks on .chzn-container already have a preventDefault

Fixes:
- issues with content security policy (#1215)
- onbeforeunload in IE (#403)

We don't need to add a preventDefault because all clicks on
.chzn-container already have a preventDefault
@kenearley
Copy link

Is there a reason it needs to be an anchor tag at all if it doesn't need an href? Would a span do just as well?

@koenpunt
Copy link
Contributor

Agree with @kenearley

@pfiller
Copy link
Contributor Author
pfiller commented Jul 19, 2013

I suppose there isn't a reason for it to be an anchor, but changing that is a much bigger change.

@kenearley
Copy link

:shipit:

@koenpunt
Copy link
Contributor

And what if we leave out the href attribute?

@kenearley
Copy link

And what if we leave out the href attribute?

Ah yeah. That might be the better solution.

@pfiller
Copy link
Contributor Author
pfiller commented Jul 19, 2013

Done and done. Works in IE8 even.

@pfiller
Copy link
Contributor Author
pfiller commented Jul 24, 2013

While testing #1385, I noticed that the cursor doesn't change to pointer when you take the href away. That sucks and I think I'm inclined to just put the href back instead of adding style.

@kenearley
Copy link

I'm inclined to just put the href back instead of adding style.

Whatever works. It's not too big of a deal either way.

@pfiller pfiller merged commit cae1786 into master Jul 24, 2013
@pfiller pfiller deleted the no-more-js-void branch July 24, 2013 21:38
pfiller added a commit that referenced this pull request Jul 26, 2013
- CSS Updates #1368, #1371
- Prevent text selection on Chosen #1374
- single_backstroke_delete defaults to true #1375
- No longer expose classes to window context #1389
- Single select value fix #1392
- Remove javascript:void and attr references #1385, #1377
- Disable Chosen on iPhone / iPod and Android mobile devices
  by default #1388
- Add Destroy Method #1396
- Option to Hide Selected & Disabled Options #1404
- Always clear result highlight #1407
- Replace characters only once #1411

- Document all the things. #1366, #1376, #1383
- Add Gemfile for compass dependency #1373
- Update copyright and license link #1397
- Add @koenpunt as a maintainer #1399
- Add anchors to documentation headers #1395
- Updated stackoverflow instructions #1403
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.

3 participants
0