Improved internal links which use react-router (#3180)

Этот коммит содержится в:
Harrison Healey
2016-06-01 08:52:28 -04:00
коммит произвёл Christopher Speller
родитель a163f8d984
Коммит 5f7ce2214a
2 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@@ -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);
}
}
}