Merge pull request '2462 - Prevent searchbarfocus on 'state' source' (#394) from 2462-focus_fix into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #394
Reviewed-by: Carlos Jimenez <carlosjr@verdnatura.es>
This commit is contained in:
Carlos Jimenez Ruiz 2020-09-29 11:41:21 +00:00
commit 4847e83fc3
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ export default class Searchbar extends Component {
this.model.clear(); this.model.clear();
if (source != 'state') if (source != 'state')
this.transition = this.$state.go(state, params, opts).transition; this.transition = this.$state.go(state, params, opts).transition;
if (source != 'bar') if (source != 'bar' && (source != 'state' || this.$state.is(this.baseState)))
focus(this.element.querySelector('vn-textfield input')); focus(this.element.querySelector('vn-textfield input'));
} }