Prevent compare results from closing when selecting a school
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
- Added stopPropagation to result item click handler - Window now stays open when adding schools to comparison - Only closes when clicking outside or using close button/ESC
This commit is contained in:
@@ -1226,7 +1226,8 @@ function setupEventListeners() {
|
||||
elements.compareResults
|
||||
.querySelectorAll(".compare-result-item")
|
||||
.forEach((item) => {
|
||||
item.addEventListener("click", () => {
|
||||
item.addEventListener("click", (e) => {
|
||||
e.stopPropagation(); // Prevent click-outside handler from closing results
|
||||
const urn = parseInt(item.dataset.urn);
|
||||
const school = data.schools.find((s) => s.urn === urn);
|
||||
if (school) {
|
||||
|
||||
Reference in New Issue
Block a user