Skip to content

Commit

Permalink
fix: the extension page will refresh after clicking the button. We ne…
Browse files Browse the repository at this point in the history
…ed to add preventDefault to prevent form default behavior. (#1378)

Co-authored-by: George <[email protected]>
  • Loading branch information
minggeorgelei and George authored Dec 24, 2024
1 parent 5064031 commit 692e9a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api-samples/browsingData/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ function parseMilliseconds(timeframe) {
return null;
}

function buttonClicked() {
function buttonClicked(event) {
event.preventDefault();
const option = document.getElementById('timeframe');
let selectedTimeframe = option.value;
let removal_start = parseMilliseconds(selectedTimeframe);
Expand Down

0 comments on commit 692e9a9

Please sign in to comment.