summaryrefslogtreecommitdiffstats
path: root/webapp/utils/text_formatting.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/utils/text_formatting.jsx')
-rw-r--r--webapp/utils/text_formatting.jsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/webapp/utils/text_formatting.jsx b/webapp/utils/text_formatting.jsx
index 21bfe5333..cc4a24d19 100644
--- a/webapp/utils/text_formatting.jsx
+++ b/webapp/utils/text_formatting.jsx
@@ -450,7 +450,13 @@ export function handleClick(e) {
} else if (hashtagAttribute) {
Utils.searchForTerm(hashtagAttribute.value);
} else if (linkAttribute) {
- browserHistory.push(linkAttribute.value);
+ const MIDDLE_MOUSE_BUTTON = 1;
+
+ if (!(e.button === MIDDLE_MOUSE_BUTTON || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)) {
+ e.preventDefault();
+
+ browserHistory.push(linkAttribute.value);
+ }
}
}