{
+ do {
+ await new Promise(window.requestAnimationFrame);
+ } while (!api.focusable);
+ api.refocus();
+}
diff --git a/ts/editor/plain-text-input/PlainTextInput.svelte b/ts/editor/plain-text-input/PlainTextInput.svelte
index 67d4f8049..d3479f418 100644
--- a/ts/editor/plain-text-input/PlainTextInput.svelte
+++ b/ts/editor/plain-text-input/PlainTextInput.svelte
@@ -39,7 +39,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import removeProhibitedTags from "./remove-prohibited";
import { storedToUndecorated, undecoratedToStored } from "./transform";
+ export let isDefault: boolean;
export let hidden: boolean;
+ export let richTextHidden: boolean;
const configuration = {
mode: htmlanki,
@@ -143,6 +145,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
($focusedInput = api)}
>
.plain-text-input {
- overflow-x: hidden;
+ overflow: hidden;
+
+ border-top: 1px solid var(--border);
+ border-radius: 0 0 5px 5px;
+
+ &.is-default {
+ border-top: none;
+ border-bottom: 1px solid var(--border);
+ border-radius: 5px 5px 0 0;
+ }
+ &.alone {
+ border: none;
+ border-radius: 5px;
+ }
:global(.CodeMirror) {
- border-radius: 0 0 5px 5px;
- border-top: 1px solid var(--border);
background: var(--code-bg);
}
:global(.CodeMirror-lines) {