Skip to content

Commit 05bffce

Browse files
committed
fixed a bug where the restart button would appear in the wrong place
1 parent a23107f commit 05bffce

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

public/js/userconfig.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ function setQuickTabMode(mode) {
9595
<key>esc</key> - command line`);
9696

9797
} else {
98-
$("#restartTestButton").remove();
98+
// $("#restartTestButton").remove();
99+
$("#restartTestButton").addClass('hidden');
99100
$("#bottom .keyTips").html(`<key>tab</key> - restart test<br>
100101
<key>esc</key> - command line`);
101102
}
@@ -105,13 +106,15 @@ function setQuickTabMode(mode) {
105106
function toggleQuickTabMode() {
106107
config.quickTab = !config.quickTab;
107108
if (!config.quickTab) {
108-
$(".pageTest").append('<div id="restartTestButton" class="" tabindex="0"><i class="fas fa-redo-alt"></i></div>');
109+
// $(".pageTest").append('<div id="restartTestButton" class="" tabindex="0"><i class="fas fa-redo-alt"></i></div>');
110+
$("#restartTestButton").removeClass('hidden');
109111
$("#restartTestButton").css("opacity", 1);
110112
$("#bottom .keyTips").html(`<key>tab</key> and <key>enter</key> / <key>space</key> - restart test<br>
111113
<key>esc</key> - command line`);
112114

113115
} else {
114-
$("#restartTestButton").remove();
116+
// $("#restartTestButton").remove();
117+
$("#restartTestButton").addClass('hidden');
115118
$("#bottom .keyTips").html(`<key>tab</key> - restart test<br>
116119
<key>esc</key> - command line`);
117120
}

0 commit comments

Comments
 (0)