mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Focus first input element after 'Add and Add another'
When using 'Add and Add Another' button in entity adder dialog the dialog lose focus when an item is successfully added. It caused by search dialog filter input. It gets focus in search facet's refresh. The refresh is happening when item is added. This patch is disabling this focus and additionally is focusing first input element to allow imidiate definion of another item
This commit is contained in:
@@ -63,6 +63,7 @@ IPA.entity_adder_dialog = function(spec) {
|
||||
var facet = IPA.current_entity.get_facet();
|
||||
facet.refresh();
|
||||
that.reset();
|
||||
that.focus_first_element();
|
||||
},
|
||||
that.on_error);
|
||||
}
|
||||
|
@@ -215,7 +215,7 @@ IPA.search_facet = function(spec, no_init) {
|
||||
var command = that.create_refresh_command();
|
||||
|
||||
command.on_success = function(data, text_status, xhr) {
|
||||
that.filter.focus();
|
||||
if (!IPA.opened_dialogs.dialogs.length) that.filter.focus();
|
||||
that.load(data);
|
||||
that.show_content();
|
||||
};
|
||||
|
Reference in New Issue
Block a user