settings: Use form element in handler for notification settings.

Notification settings uses '.on("change", "input, select")' to
handle changes to all types of input elements. But for realm-level
settings page, both display and notification settings have the
same container unlike the user-level settings, so we use inner
form element ".notification-settings-form" such that this handler
is for changing input of notification settings and not display
settings.
This commit is contained in:
Sahil Batra 2021-08-29 16:47:57 +05:30 committed by Tim Abbott
parent 9551551b00
commit 791d09ccd0
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ export function set_up() {
const container = $("#user-notification-settings");
const patch_url = "/json/settings";
const settings_object = user_settings;
container.on("change", "input, select", function (e) {
container.find(".notification-settings-form").on("change", "input, select", function (e) {
e.preventDefault();
e.stopPropagation();
const input_elem = $(e.currentTarget);