Every line of 'jquery input change while typing' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
6 function notifyTyping(ele) { 7 LiveHelp.notifyTyping(ele.id, dwr.util.getValue(ele)); 8 }
43 function handleInputElementChanged(evt) { 44 console.log('handleInputElementChanged Called'); 45 46 messageElement.textContent = 'handleInputElementChanged Called'; 47 };
25 static isInput(target: HTMLElement) { 26 return !target.tagName || 27 // this is in-iframe forwarding case 28 target.tagName.toUpperCase() === 'INPUT' || 29 target.tagName.toUpperCase() === 'TEXTAREA' || 30 target.getAttribute('contenteditable') === 'true'; 31 }
167 inputOn(inputEle, type) { 168 if (typeof inputEle !== 'string') { 169 console.error('aKeyboard: The inputEle parameter needs to be a string '); 170 return; 171 } 172 173 if (typeof type !== 'string') { 174 console.error('aKeyboard: The type parameter needs to be a string '); 175 return; 176 } 177 178 const inputEl = document.querySelector(inputEle), 179 elKeysEl = document.querySelectorAll(this.obj.el + ' .akeyboard-mobileKeyboard-keys'); 180 181 for (let i = 0; i < elKeysEl.length; i++) { 182 switch (elKeysEl[i].innerHTML) { 183 case '⇧': 184 continue; 185 186 case '⇦': 187 elKeysEl[i].onclick = function() { 188 inputEl[type] = inputEl[type].substr(0, inputEl[type].length - 1); 189 } 190 continue; 191 192 case 'Enter': 193 elKeysEl[i].onclick = function() { 194 inputEl[type] += '\n'; 195 } 196 continue; 197 198 case 'Space': 199 elKeysEl[i].onclick = function() { 200 inputEl[type] += ' '; 201 } 202 continue; 203 } 204 205 elKeysEl[i].onclick = function() { 206 inputEl[type] += this.innerText; 207 } 208 } 209 }
102 _removeInput(input) { 103 if (input) { 104 input.removeEventListener('keypress', this._handleKeyPress); 105 input.removeEventListener('keydown', this._handleKeyDown); 106 this.input = null; 107 } 108 }
34 handleInputChange(e) { 35 this.setState({ text: e.target.value }); 36 }
229 inputOn(inputEle, type) { 230 if (typeof inputEle !== 'string') { 231 console.error('aKeyboard: The inputEle parameter needs to be a string '); 232 return; 233 } 234 235 if (typeof type !== 'string') { 236 console.error('aKeyboard: The type parameter needs to be a string '); 237 return; 238 } 239 240 const inputEl = document.querySelector(inputEle), 241 elKeysEl = document.querySelectorAll(this.obj.el + ' .akeyboard-keyboard-keys'); 242 243 for (let i = 0; i < elKeysEl.length; i++) { 244 switch (elKeysEl[i].innerHTML) { 245 case 'Shift': 246 case 'Caps': 247 continue; 248 249 case 'Delete': 250 elKeysEl[i].onclick = function() { 251 inputEl[type] = inputEl[type].substr(0, inputEl[type].length - 1); 252 } 253 continue; 254 255 case 'Tab': 256 elKeysEl[i].onclick = function() { 257 inputEl[type] += ' '; 258 } 259 continue; 260 261 case 'Enter': 262 elKeysEl[i].onclick = function() { 263 inputEl[type] += '\n'; 264 } 265 continue; 266 267 case 'Space': 268 elKeysEl[i].onclick = function() { 269 inputEl[type] += ' '; 270 } 271 continue; 272 } 273 274 elKeysEl[i].onclick = function() { 275 inputEl[type] += this.innerText; 276 } 277 } 278 }
46 _changeInput(value=this._value()){ this.props.onChange(value) }
63 get isTyping() { 64 return this.typing.isTyping; 65 }
212 function inputKeyDown(event, inputBox) { 213 // Submit on enter key, dis-allowing blank messages 214 if (event.keyCode === 13 && inputBox.value) { 215 // Retrieve the context from the previous server response 216 var context; 217 var latestResponse = Api.getResponsePayload(); 218 if (latestResponse) { 219 context = latestResponse.context; 220 } 221 222 // Send the user message 223 Api.sendRequest(inputBox.value, context); 224 225 // Clear input box for further messages 226 inputBox.value = ''; 227 Common.fireEvent(inputBox, 'input'); 228 } 229 }