mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: makes create-account userfields using dropdowns accessible (#6991)
This commit is contained in:
parent
603f2c6090
commit
47fe34d794
@ -16,10 +16,22 @@ export default Ember.Component.extend({
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.$().on("click.dropdown-user-field-label", "[for]", event => {
|
||||||
|
const $element = $(event.target);
|
||||||
|
const $target = $(`#${$element.attr("for")}`);
|
||||||
|
|
||||||
|
if ($target.is(".select-kit")) {
|
||||||
|
event.preventDefault();
|
||||||
|
$target.find(".select-kit-header").trigger("click");
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
|
|
||||||
this.$().off("keydown.discourse-create-account");
|
this.$().off("keydown.discourse-create-account");
|
||||||
|
this.$().off("click.dropdown-user-field-label");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user