mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
fix ltrs
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user