MCPcopy Create free account
hub / github.com/cryptii/cryptii / textareaValueDidChange

Method textareaValueDidChange

src/View/Viewer/Text.js:109–125  ·  view source on GitHub ↗

* Triggered when textarea value changed. * @protected * @param {Event} evt

(evt)

Source from the content-addressed store, hash-verified

107 * @param {Event} evt
108 */
109 textareaValueDidChange (evt) {
110 if (this.isDisabled()) {
111 evt.preventDefault()
112 return false
113 }
114
115 const text = this._$textarea.value
116
117 if (this._text !== text) {
118 this._text = text
119
120 // notify model about text change
121 this.getModel().viewTextDidChange(this, this._text)
122
123 this.layoutTextarea()
124 }
125 }
126
127 /**
128 * Layouts view and its subviews.

Callers

nothing calls this directly

Calls 4

isDisabledMethod · 0.95
layoutTextareaMethod · 0.95
viewTextDidChangeMethod · 0.45
getModelMethod · 0.45

Tested by

no test coverage detected