Skip to content

Commit 481b603

Browse files
committed
Skip activeElement for focussing if it does not exist
1 parent 0942728 commit 481b603

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

view/base/templates/script/ajax-queue.phtml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,10 @@ if ($interval < 10) {
208208
});
209209

210210
if (this.activeElementId) {
211-
document.getElementById(this.activeElementId).focus();
211+
const activeElement = document.getElementById(this.activeElementId);
212+
if (activeElement) {
213+
activeElement.focus();
214+
}
212215
}
213216
}
214217
};

0 commit comments

Comments
 (0)