Call next in azure editor (#19799)

pull/19700/head^2
Andrej Ocenas 6 years ago committed by GitHub
parent 3ca01c3255
commit 14cf2a3514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      public/app/plugins/datasource/grafana-azure-monitor-datasource/editor/query_field.tsx

@ -215,7 +215,7 @@ class QueryField extends React.Component<any, any> {
);
};
handleBlur = () => {
handleBlur = (event: Event, editor: CoreEditor, next: Function) => {
const { onBlur } = this.props;
// If we dont wait here, menu clicks wont work because the menu
// will be gone.
@ -224,15 +224,17 @@ class QueryField extends React.Component<any, any> {
onBlur();
}
this.restoreEscapeKeyBinding();
return next();
};
handleFocus = () => {
handleFocus = (event: Event, editor: CoreEditor, next: Function) => {
const { onFocus } = this.props;
if (onFocus) {
onFocus();
}
// Don't go back to dashboard if Escape pressed inside the editor.
this.removeEscapeKeyBinding();
return next();
};
removeEscapeKeyBinding() {

Loading…
Cancel
Save