mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
23c6547b5b
refs https://github.com/TryGhost/Team/issues/993 - added calls to `onFocus()` and `onBlur()` arguments inside the trigger when the input is focused/blurred so that the active class is correctly applied by ember-power-select - removed unnecessary mousedown propagation cancellation, it was a copied from `<GhTokenInput>` where extra mouse handling is necessary for buttons inside tokens - updated `.gh-input-with-select` styles to add the border when active
24 lines
794 B
Handlebars
24 lines
794 B
Handlebars
{{#if @extra.inputIcon}}
|
|
{{svg-jar @extra.inputIcon class=@extra.inputIconClass}}
|
|
{{/if}}
|
|
<input
|
|
{{did-insert this.registerInput}}
|
|
{{did-update this.closeWhenEmpty @select.results}}
|
|
{{on "input" this.handleInput}}
|
|
{{on "keydown" this.handleKeydown}}
|
|
{{on "keyup" this.handleKeyup}}
|
|
{{on "focus" this.handleFocus}}
|
|
{{on "blur" this.handleBlur}}
|
|
class="gh-input-with-select-input"
|
|
type={{or @extra.inputType "text"}}
|
|
autofocus={{@extra.autofocus}}
|
|
autocomplete="off"
|
|
autocorrect="off"
|
|
autocapitalize="off"
|
|
value={{@extra.value}}
|
|
name="selectSearchTerm" {{!-- contains "search" to prevent Safari showing autocomplete --}}
|
|
spellcheck="false"
|
|
role="combobox"
|
|
placeholder={{@placeholder}}
|
|
disabled={{@select.disabled}}
|
|
> |