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

Method subviewDidFocus

src/View.js:312–321  ·  view source on GitHub ↗

* Triggered when a subview receives focus. * @param {View} subview

(subview)

Source from the content-addressed store, hash-verified

310 * @param {View} subview
311 */
312 subviewDidFocus (subview) {
313 if (this.hasFocus()) {
314 // blur other subviews
315 this._subviews
316 .filter(view => view !== subview)
317 .forEach(view => view.blur())
318 } else {
319 this.focus()
320 }
321 }
322
323 /**
324 * Triggered when view receives focus.

Callers 1

setFocusMethod · 0.80

Calls 3

hasFocusMethod · 0.95
focusMethod · 0.95
blurMethod · 0.80

Tested by

no test coverage detected