Fix broken buttons by not hijacking click event without data-href attribute (#1081)

* Fix broken buttons by not hijacking click event without `data-href` attribute
This commit is contained in:
Kevin Chung
2019-08-09 00:35:29 -04:00
committed by GitHub
parent 5c4f1d78fa
commit bef5f1796b

View File

@@ -24,7 +24,7 @@ $(function() {
}
});
$("tr").click(function() {
$("tr[data-href]").click(function() {
var sel = getSelection().toString();
if (!sel) {
var href = $(this).attr("data-href");
@@ -35,7 +35,7 @@ $(function() {
return false;
});
$("tr a, button").click(function(e) {
$("tr[data-href] a, tr[data-href] button").click(function(e) {
// TODO: This is a hack to allow modal close buttons to work
if (!$(this).attr("data-dismiss")) {
e.stopPropagation();