Skip to content

Commit

Permalink
fix(typography): lint test. (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
byq1213 committed Jun 14, 2024
1 parent ba8e51f commit 2514beb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/typography/utils/copy-to-clipboard/toggle-selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const deselectCurrent = (): (() => void) => {
const selection = document.getSelection();
if (!selection.rangeCount) {
return function () { };
return function () {};
}
let active = document.activeElement as any;

Expand All @@ -12,9 +12,8 @@ const deselectCurrent = (): (() => void) => {
ranges.push(selection.getRangeAt(i));
}

switch (
active.tagName.toUpperCase() // .toUpperCase handles XHTML
) {
const tagName = active.tagName.toUpperCase(); // toUpperCase handles XHTML
switch (tagName) {
case 'INPUT':
case 'TEXTAREA':
active.blur();
Expand Down

0 comments on commit 2514beb

Please sign in to comment.