* Triggered when a subview receives focus. * @param {View} subview
(subview)
| 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. |