Ember.TextSupport Class packages/ember-handlebars/lib/controls/text_support.js:11
PRIVATE
Defined in: packages/ember-handlebars/lib/controls/text_support.js:11
Module: ember-handlebars
Shared mixin used by Ember.TextField
and Ember.TextArea
.
cancel
(event)
Called when the user hits escape.
Called by the Ember.TextSupport
mixin on keyUp if keycode matches 27.
Uses sendAction to send the escape-press
action to the controller.
Parameters:
- event Event
focusIn
(event)
Called when the text area is focused.
Parameters:
- event Event
focusOut
(event)
Called when the text area is blurred.
Parameters:
- event Event
insertNewline
(event)
The action to be sent when the user inserts a new line.
Called by the Ember.TextSupport
mixin on keyUp if keycode matches 13.
Uses sendAction to send the enter
action to the controller.
Parameters:
- event Event
keyPress
(event)
The action to be sent when the user presses a key. Enabled by setting
the onEvent
property to keyPress
.
Uses sendAction to send the keyPress
action to the controller.
Parameters:
- event Event
action
String
The action to be sent when the user presses the return key.
This is similar to the {{action}}
helper, but is fired when
the user presses the return key when editing a text field, and sends
the value of the field as the context.
Default: null
bubbles
Boolean
Whether they keyUp
event that triggers an action
to be sent continues
propagating to other views.
By default, when the user presses the return key on their keyboard and
the text field has an action
set, the action will be sent to the view's
controller and the key event will stop propagating.
If you would like parent views to receive the keyUp
event even after an
action has been dispatched, set bubbles
to true.
Default: false
onEvent
String
The event that should send the action.
Options are:
enter
: the user pressed enterkeyPress
: the user pressed a key
Default: enter