(typing)
| 158 | // Reset the input to correspond to the selection (or to be empty, |
| 159 | // when not typing and nothing is selected) |
| 160 | reset(typing) { |
| 161 | if (this.contextMenuPending || this.composing) return |
| 162 | let cm = this.cm |
| 163 | if (cm.somethingSelected()) { |
| 164 | this.prevInput = "" |
| 165 | let content = cm.getSelection() |
| 166 | this.textarea.value = content |
| 167 | if (cm.state.focused) selectInput(this.textarea) |
| 168 | if (ie && ie_version >= 9) this.hasSelection = content |
| 169 | } else if (!typing) { |
| 170 | this.prevInput = this.textarea.value = "" |
| 171 | if (ie && ie_version >= 9) this.hasSelection = null |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | getField() { return this.textarea } |
| 176 |
no test coverage detected