MRTextFieldEntity

MRTextFieldEntity ⇐ MRTextInputEntity

The text element that is used to represent normal user-entry text field items one would expect in a web-browser. Limits the one-line. mr-textfield

Kind: global class
Extends: MRTextInputEntity

mrTextFieldEntity.MRTextFieldEntity

Kind: instance class of MRTextFieldEntity

new exports.MRTextFieldEntity()

Constructor for the textField entity component.

mrTextFieldEntity.createHiddenInputElement()

Called by connected to make sure the hiddenInput dom element is created as expected.

Kind: instance method of MRTextFieldEntity

mrTextFieldEntity.fillInHiddenInputElementWithUserData()

Called by connected after createHiddenInputElement to fill it in with the user’s given attribute information.

Kind: instance method of MRTextFieldEntity

mrTextFieldEntity.updateTextDisplay(fromCursorMove)

Used on event trigger to update the textObj visual based on the hiddenInput DOM element.

Kind: instance method of MRTextFieldEntity

Param Type Default Description
fromCursorMove boolean false default set as false if not supplied. Used because we only want to move the visible region if it is not already handled. Since cursor movement already handles that region change, then we only need to update the new text. Otherwise, we also need to scroll and update the new text.

mrTextFieldEntity.hasTextSubsetForVerticalScrolling() ⇒ boolean

Getter for whether this textinput should handle vertical scrolling or not.

Kind: instance method of MRTextFieldEntity
Returns: boolean - true if it should be handled, false otherwise

mrTextFieldEntity.hasTextSubsetForHorizontalScrolling() ⇒ boolean

Getter for whether this textinput should handle horizontal scrolling or not.

Kind: instance method of MRTextFieldEntity
Returns: boolean - true if it should be handled, false otherwise

mrTextFieldEntity.handleKeydown(event)

Handles keydown events for scrolling and cursor navigation. Note that this is different than an input event which for our purposes, handles the non-navigation key-presses.

Kind: instance method of MRTextFieldEntity

Param Type Description
event event the keydown event