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
selenium-screenshot-testing
Kevin Chung 2019-08-09 00:35:29 -04:00 committed by GitHub
parent 5c4f1d78fa
commit bef5f1796b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

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