mirror of
https://github.com/plankanban/planka.git
synced 2025-12-25 17:25:01 +03:00
@@ -1,5 +1,8 @@
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user