fix: classify button stuck on "Classifying…" on modal reopen
submitClassify()'s success path closes the modal and reloads the list but never resets the submit button (only the error paths did), and openClassifyModal() reset the form fields but not the button. So after a successful classify, the next modal opened with the button stuck disabled on "Classifying…" — only a full page refresh cleared it. Reset the submit button to "Classify"/enabled in openClassifyModal so every open starts clean regardless of how the previous one ended. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -266,6 +266,12 @@ async function openClassifyModal(pendingId) {
|
|||||||
document.getElementById('new-project-name').value = '';
|
document.getElementById('new-project-name').value = '';
|
||||||
document.getElementById('new-location-name').value = '';
|
document.getElementById('new-location-name').value = '';
|
||||||
|
|
||||||
|
// Reset the submit button — the success path closes the modal without
|
||||||
|
// clearing it, so without this it stays stuck on "Classifying…" on reopen.
|
||||||
|
const submitBtn = document.getElementById('classify-submit');
|
||||||
|
submitBtn.disabled = false;
|
||||||
|
submitBtn.textContent = 'Classify';
|
||||||
|
|
||||||
// Coords hint for "use captured coords" checkbox.
|
// Coords hint for "use captured coords" checkbox.
|
||||||
const hint = document.getElementById('captured-coords-hint');
|
const hint = document.getElementById('captured-coords-hint');
|
||||||
if (pd.coordinates) {
|
if (pd.coordinates) {
|
||||||
|
|||||||
Reference in New Issue
Block a user