We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fc925c commit ff54a32Copy full SHA for ff54a32
lib/CaptureClicks.js
@@ -3,6 +3,7 @@
3
var React = require('react');
4
var urllite = require('urllite/lib/core');
5
var Environment = require('./environment');
6
+var HashEnvironment = require('./environment/HashEnvironment');
7
var assign = Object.assign || require('object-assign');
8
9
/**
@@ -70,6 +71,11 @@ var CaptureClicks = React.createClass({
70
71
return;
72
}
73
74
+ // Ignore hash (used often instead of javascript:void(0) in strict CSP envs)
75
+ if (el.href === '#' && !(this.props.environment instanceof HashEnvironment)) {
76
+ return;
77
+ }
78
+
79
// Use a regular expression to parse URLs instead of relying on the browser
80
// to do it for us (because IE).
81
var url = urllite(el.href);
0 commit comments