renameFolderMenu: Set the entry as menu focus actor
When the rename folder menu is opened the text entry is expected to be focused and selected for a quick editing. While this is required it doesn't actually happens since PopupMenu by default gives the key focus to the source actor, that is then free to pass the key focus to the menu if there's an user interaction. In this case however, we want the text entry to be focused once we prompt the menu, so just use the PopupMenu's focusActor property to ensure it will handle it for us. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1604 https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720
This commit is contained in:
parent
54f369404a
commit
147cb53140
@ -1732,6 +1732,9 @@ var RenameFolderMenu = class RenameFolderMenu extends PopupMenu.PopupMenu {
|
|||||||
});
|
});
|
||||||
box.add_child(this._entry);
|
box.add_child(this._entry);
|
||||||
|
|
||||||
|
// Focus the text entry on menu pop-up
|
||||||
|
this.focusActor = this._entry.clutter_text;
|
||||||
|
|
||||||
this._entry.clutter_text.connect('notify::text',
|
this._entry.clutter_text.connect('notify::text',
|
||||||
this._validate.bind(this));
|
this._validate.bind(this));
|
||||||
this._entry.clutter_text.connect('activate',
|
this._entry.clutter_text.connect('activate',
|
||||||
|
Loading…
Reference in New Issue
Block a user