Skip to content

Commit

Permalink
chore(table): move workaround comment back to its usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfranco committed Jan 20, 2025
1 parent 4e7dc05 commit 22a0be3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/calcite-components/src/components/table/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ export class Table extends LitElement implements LoadableComponent {

@state() pageStartRow = 1;

/* Workaround for Safari https://bugs.webkit.org/show_bug.cgi?id=258430 https://bugs.webkit.org/show_bug.cgi?id=239478 */

// ⚠️ browser-sniffing is not a best practice and should be avoided ⚠️
@state() readCellContentsToAT: boolean;

@state() selectedCount = 0;
Expand Down Expand Up @@ -178,7 +175,11 @@ export class Table extends LitElement implements LoadableComponent {

async load(): Promise<void> {
setUpLoadableComponent(this);

/* Workaround for Safari https://bugs.webkit.org/show_bug.cgi?id=258430 https://bugs.webkit.org/show_bug.cgi?id=239478 */
// ⚠️ browser-sniffing is not a best practice and should be avoided ⚠️
this.readCellContentsToAT = /safari/i.test(getUserAgentString());

this.listenOn(this.el.shadowRoot, "slotchange", this.handleSlotChange);
}

Expand Down

0 comments on commit 22a0be3

Please sign in to comment.