UX: search input losing focus on text change event.

It causes issue while selecting the chinese (unicode) language words from autocomplete in windows 10.
This commit is contained in:
Vinoth Kannan 2020-02-11 11:21:00 +05:30
parent 80da6a5620
commit 09da5dd7bb
2 changed files with 1 additions and 9 deletions

View File

@ -3,14 +3,6 @@ import debounce from "discourse/lib/debounce";
export default Ember.Component.extend({
classNames: "knowledge-explorer-search",
didUpdateAttrs() {
this._super(...arguments);
Ember.run.schedule("afterRender", () => {
document.querySelector(".knowledge-explorer-search-bar").focus();
});
},
debouncedSearch: debounce(function(term) {
this.onSearch(term);
}, 500),

View File

@ -3,7 +3,7 @@
type="text"
value=(readonly searchTerm)
input=(action "onSearchTermChange" value="target.value")
class="knowledge-explorer-search-bar"
class="no-blur knowledge-explorer-search-bar"
autocorrect="off"
placeholder=(i18n "knowledge_explorer.search.placeholder")
autocapitalize="off"