This commit is contained in:
Cory LaViska
2024-05-28 15:28:20 -04:00
parent c3bd625d46
commit 3119a75c19
4 changed files with 4 additions and 4 deletions

View File

@@ -487,7 +487,7 @@ export default class WaCarousel extends WebAwesomeElement {
const currentPage = this.getCurrentPage();
const prevEnabled = this.canScrollPrev();
const nextEnabled = this.canScrollNext();
const isLtr = this.localize.dir() === 'ltr';
const isLtr = this.matches(':dir(ltr)');
return html`
<div part="base" class="carousel">

View File

@@ -63,7 +63,7 @@ export default class WaImageComparer extends WebAwesomeElement {
}
private handleKeyDown(event: KeyboardEvent) {
const isLtr = this.localize.dir() === 'ltr';
const isLtr = this.matches(':dir(ltr)');
const isRtl = this.matches(':dir(rtl)');
if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) {

View File

@@ -106,8 +106,8 @@ export default class WaRating extends WebAwesomeElement {
}
private handleKeyDown(event: KeyboardEvent) {
const isLtr = this.matches(':dir(ltr)');
const isRtl = this.matches(':dir(rtl)');
const isLtr = !isRtl;
const oldValue = this.value;
if (this.disabled || this.readonly) {

View File

@@ -225,8 +225,8 @@ export default class WaTree extends WebAwesomeElement {
}
const items = this.getFocusableItems();
const isLtr = this.matches(':dir(ltr)');
const isRtl = this.matches(':dir(rtl)');
const isLtr = !isRtl;
if (items.length > 0) {
event.preventDefault();