diff --git a/ts/change-notetype/MapperRow.svelte b/ts/change-notetype/MapperRow.svelte
index 9afe323ad..d663fd7e0 100644
--- a/ts/change-notetype/MapperRow.svelte
+++ b/ts/change-notetype/MapperRow.svelte
@@ -5,6 +5,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-
-
-
-
+
{$info.getNewName(ctx, newIndex)}
diff --git a/ts/change-notetype/NotetypeSelector.svelte b/ts/change-notetype/NotetypeSelector.svelte
index 9c0791935..3cd85e354 100644
--- a/ts/change-notetype/NotetypeSelector.svelte
+++ b/ts/change-notetype/NotetypeSelector.svelte
@@ -20,9 +20,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
$: options = Array.from($notetypes, (notetype) => notetype.name);
$: label = options[value];
- function blur(e: CustomEvent): void {
- state.setTargetNotetypeIndex(e.detail.newIdx);
- }
+ $: state.setTargetNotetypeIndex(value);
@@ -36,7 +34,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{@html arrowRightIcon}
{/if}
-
+
{#each options as option, idx}
{option}
{/each}
diff --git a/ts/components/DropdownItem.svelte b/ts/components/DropdownItem.svelte
index daadda779..ed18984e9 100644
--- a/ts/components/DropdownItem.svelte
+++ b/ts/components/DropdownItem.svelte
@@ -14,13 +14,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export let active = false;
export let disabled = false;
+ const rtl: boolean = window.getComputedStyle(document.body).direction == "rtl";
+
$: if (buttonRef && active) {
- setTimeout(() =>
- buttonRef!.scrollIntoView({
- behavior: "smooth",
- block: "nearest",
- }),
- );
+ buttonRef!.scrollIntoView({
+ behavior: "smooth",
+ block: "nearest",
+ });
}
export let tabbable = false;
@@ -33,6 +33,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
class="dropdown-item {className}"
class:active
class:disabled
+ class:rtl
title={tooltip}
on:mouseenter
on:focus
@@ -61,5 +62,21 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
background: var(--highlight-bg);
color: var(--highlight-fg);
}
+
+ /* selection highlight */
+ &:not(.rtl) {
+ border-left: 3px solid transparent;
+ }
+ &.rtl {
+ border-right: 3px solid transparent;
+ }
+ &.active {
+ &:not(.rtl) {
+ border-left-color: var(--border-focus);
+ }
+ &.rtl {
+ border-right-color: var(--border-focus);
+ }
+ }
}
diff --git a/ts/components/Select.svelte b/ts/components/Select.svelte
index fbb67227d..657959dbf 100644
--- a/ts/components/Select.svelte
+++ b/ts/components/Select.svelte
@@ -4,6 +4,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
setValue(value)}
on:keydown={handleKey}
bind:buttonRef={element}
diff --git a/ts/deck-options/ConfigSelector.svelte b/ts/deck-options/ConfigSelector.svelte
index 207a1b2d3..bdf9a3ded 100644
--- a/ts/deck-options/ConfigSelector.svelte
+++ b/ts/deck-options/ConfigSelector.svelte
@@ -30,7 +30,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
}
function blur(e: CustomEvent): void {
- state.setCurrentIndex(e.detail.newIdx);
+ state.setCurrentIndex(e.detail.value);
dispatchPresetChange();
}
diff --git a/ts/deck-options/deck-options-base.scss b/ts/deck-options/deck-options-base.scss
index b5a6fdf20..b88d78d93 100644
--- a/ts/deck-options/deck-options-base.scss
+++ b/ts/deck-options/deck-options-base.scss
@@ -3,7 +3,6 @@
// override Bootstrap transition duration
$carousel-transition: 0.2s;
-@import "bootstrap/scss/dropdown";
@import "bootstrap/scss/buttons";
@import "bootstrap/scss/button-group";
@import "bootstrap/scss/transitions";
diff --git a/ts/editor/editor-base.scss b/ts/editor/editor-base.scss
index cdbe76940..3b3c9a55b 100644
--- a/ts/editor/editor-base.scss
+++ b/ts/editor/editor-base.scss
@@ -6,7 +6,6 @@
$btn-disabled-opacity: 0.4;
@import "bootstrap/scss/buttons";
@import "bootstrap/scss/button-group";
-@import "bootstrap/scss/dropdown";
@import "sass/bootstrap-tooltip";
html,