mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 14:34:21 +01:00
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:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user