Skip to content

Commit

Permalink
Fix #190 regression: No new tab for "javascript:".
Browse files Browse the repository at this point in the history
The last patch accidentally made pseudo-links
(palette colors and emoticon shortcuts, which
have javascript:void('...') labels) create an
empty tab on clicking. They should be exempt.
  • Loading branch information
cburschka committed May 1, 2015
1 parent 5dbc709 commit d062c45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/core/visual.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ visual = {
* Make links open in a new tab.
*/
linkOnClick: function(jq) {
$('a[href]:not([href^=#])', jq).click(function(event) {
$('a[href]:not([href^=#]):not([href^=javascript\\:])', jq).click(function(event) {
event.preventDefault();
window.open(this.href);
});
Expand Down

0 comments on commit d062c45

Please sign in to comment.