Skip to content

Commit

Permalink
Refocus to path input after warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanrhu committed Nov 28, 2021
1 parent 75f50e1 commit a1041c7
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions frontend/components/FileBrowser/js/FileBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@
if (result_json.error) {
if (result_json.error.not_exists) {
if (!parameters.ignoreNotFound) {
GDBFrontend.showMessageBox({text: 'Path not found.'});
GDBFrontend.showMessageBox({
text: 'Path not found.',
on_close: function () {
$fileBrowser_window_box_header_path_input_rI.focus();
}
});
}
} else if (result_json.error.not_permitted) {
if (!parameters.ignoreNotFound) {
Expand Down Expand Up @@ -229,7 +234,12 @@
data.is_passive = false;
},
error: function () {
GDBFrontend.showMessageBox({text: 'Path not found.'});
GDBFrontend.showMessageBox({
text: 'Path not found.',
on_close: function () {
$fileBrowser_window_box_header_path_input_rI.focus();
}
});
}
});
};
Expand Down

0 comments on commit a1041c7

Please sign in to comment.