fix textareainput
This commit is contained in:
@@ -67,7 +67,7 @@
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
></textarea>
|
></textarea>
|
||||||
{:else if isFirefox}
|
{:else}
|
||||||
<div
|
<div
|
||||||
class="w-full h-full bg-transparent focus-within:outline-none resize-none absolute top-0 left-0 z-50 overflow-y-auto px-4 py-2 break-words whitespace-pre-wrap"
|
class="w-full h-full bg-transparent focus-within:outline-none resize-none absolute top-0 left-0 z-50 overflow-y-auto px-4 py-2 break-words whitespace-pre-wrap"
|
||||||
contenteditable="true"
|
contenteditable="true"
|
||||||
@@ -89,22 +89,7 @@
|
|||||||
bind:this={inputDom}
|
bind:this={inputDom}
|
||||||
translate="no"
|
translate="no"
|
||||||
>{value ?? ''}</div>
|
>{value ?? ''}</div>
|
||||||
{:else}
|
{/if}
|
||||||
<div
|
|
||||||
class="w-full h-full bg-transparent focus-within:outline-none resize-none absolute top-0 left-0 z-50 overflow-y-auto px-4 py-2 break-words whitespace-pre-wrap"
|
|
||||||
contenteditable="plaintext-only"
|
|
||||||
bind:innerText={value}
|
|
||||||
onkeydown={(e) => {
|
|
||||||
handleKeyDown(e)
|
|
||||||
onInput()
|
|
||||||
}}
|
|
||||||
oninput={(e) => {
|
|
||||||
autoComplete()
|
|
||||||
}}
|
|
||||||
bind:this={inputDom}
|
|
||||||
translate="no"
|
|
||||||
>{value ?? ''}</div>
|
|
||||||
{/if}
|
|
||||||
<div class="hidden absolute z-100 bg-bgcolor border border-darkborderc p-2 flex-col" bind:this={autoCompleteDom}>
|
<div class="hidden absolute z-100 bg-bgcolor border border-darkborderc p-2 flex-col" bind:this={autoCompleteDom}>
|
||||||
{#each autocompleteContents as content, i}
|
{#each autocompleteContents as content, i}
|
||||||
<button class="w-full text-left py-1 px-2 bg-bgcolor" class:text-blue-500={selectingAutoComplete === i} onclick={() => {
|
<button class="w-full text-left py-1 px-2 bg-bgcolor" class:text-blue-500={selectingAutoComplete === i} onclick={() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user