mirror of
https://github.com/plankanban/planka.git
synced 2025-12-23 01:11:40 +03:00
9 lines
296 B
JavaScript
9 lines
296 B
JavaScript
export const focusEnd = (element) => {
|
|
element.focus();
|
|
element.setSelectionRange(element.value.length + 1, element.value.length + 1);
|
|
};
|
|
|
|
export const isActiveTextElement = (element) =>
|
|
['input', 'textarea'].includes(element.tagName.toLowerCase()) &&
|
|
element === document.activeElement;
|