MCPcopy Create free account
hub / github.com/UI5/webcomponents / _onTokenizerKeydown

Method _onTokenizerKeydown

packages/main/src/MultiInput.ts:289–301  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

287 }
288
289 _onTokenizerKeydown(e: KeyboardEvent) {
290 const rightCtrl = isRightCtrl(e);
291 if (isRight(e) || isDown(e) || isEnd(e) || rightCtrl) {
292 e.preventDefault();
293 const lastTokenIndex = this.tokens.length - 1;
294
295 if (e.target === this.tokens[lastTokenIndex] && this.tokens[lastTokenIndex] === document.activeElement) {
296 setTimeout(() => {
297 this.focus();
298 }, 0);
299 }
300 }
301 }
302
303 _handleLeft(e: KeyboardEvent) {
304 const cursorPosition = this.getDomRef()!.querySelector(`input`)!.selectionStart;

Callers

nothing calls this directly

Calls 5

isRightCtrlFunction · 0.85
isRightFunction · 0.85
isDownFunction · 0.85
isEndFunction · 0.85
focusMethod · 0.45

Tested by

no test coverage detected