Skip to content

Commit

Permalink
fix/define autochecked checkboxes on issue list in firefox (#7320)
Browse files Browse the repository at this point in the history
* fix/define autochecked checkboxes on issue list on firefox

- close: deselect all
- nonclose: show buttons for close/label/milestone...

fix #7311

Signed-off-by: Michael Gnehr <[email protected]>

* remove unnessesary timeouts

Signed-off-by: Michael Gnehr <[email protected]>

* add comments in code - this is targeting firefox

Signed-off-by: Michael Gnehr <[email protected]>
  • Loading branch information
Cherrg authored and zeripath committed Jul 12, 2019
1 parent 0018d56 commit a23e192
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,21 @@ $(document).ready(function () {
elementId = '';
action = 'clear';
}
updateIssuesMeta(url, action, issueIDs, elementId).then(reload);
updateIssuesMeta(url, action, issueIDs, elementId).then(function() {
// NOTICE: This reset of checkbox state targets Firefox caching behaviour, as the checkboxes stay checked after reload
if (action === "close" || action === "open" ){
//uncheck all checkboxes
$('.issue-checkbox input[type="checkbox"]').each(function(_,e){ e.checked = false; });
}
reload();
});
});

// NOTICE: This event trigger targets Firefox caching behaviour, as the checkboxes stay checked after reload
// trigger ckecked event, if checkboxes are checked on load
$('.issue-checkbox input[type="checkbox"]:checked').first().each(function(_,e) {
e.checked = false;
$(e).click();
});

buttonsClickOnEnter();
Expand Down

0 comments on commit a23e192

Please sign in to comment.