Skip to content

Commit 7b7c4d5

Browse files
committed
Enhance change event triggering in SettingsForms by adding bubbling option to improve event propagation. This change ensures that the change events are properly detected by parent elements, enhancing overall functionality.
1 parent 4ada77f commit 7b7c4d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

frontend/static/js/settings_forms.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4587,7 +4587,7 @@ const SettingsForms = {
45874587
}
45884588

45894589
// Trigger change event to update save button state
4590-
const changeEvent = new Event('change');
4590+
const changeEvent = new Event('change', { bubbles: true });
45914591
container.dispatchEvent(changeEvent);
45924592
}
45934593
});
@@ -4845,7 +4845,7 @@ const SettingsForms = {
48454845
updateAddButtonText(newAddBtn);
48464846

48474847
// Trigger change event
4848-
const changeEvent = new Event('change');
4848+
const changeEvent = new Event('change', { bubbles: true });
48494849
container.dispatchEvent(changeEvent);
48504850
});
48514851
}
@@ -4975,7 +4975,7 @@ const SettingsForms = {
49754975

49764976
// Update button text and trigger change event
49774977
updateAddButtonText(newAddBtn);
4978-
const changeEvent = new Event('change');
4978+
const changeEvent = new Event('change', { bubbles: true });
49794979
container.dispatchEvent(changeEvent);
49804980

49814981
// Update Swaparr visibility for the new instance

0 commit comments

Comments
 (0)