Removed overflow in the TextEditor. Panel fix. (#3840)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2023-10-16 08:08:31 +03:00 committed by GitHub
parent 945f295336
commit d5d98f64e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 11 deletions

View File

@ -65,15 +65,15 @@
const startScrollHeightCheck = () => {
clearTimeout(timer)
timer = setTimeout(() => {
if (scroll == null) {
if (content == null) {
return
}
if (content !== undefined && lastScrollHeight <= content?.scrollHeight && count <= waitCount) {
if (lastScrollHeight <= content?.scrollHeight && count <= waitCount) {
count = lastScrollHeight < content.scrollHeight ? 0 : count + 1
lastScrollHeight = content.scrollHeight
startScrollHeightCheck()
} else if (content !== undefined) {
} else {
lastScrollHeight = -1
count = 0

View File

@ -64,7 +64,7 @@
export let field: string | undefined = undefined
export let autoOverflow = false
export let overflow: 'auto' | 'none' = 'auto'
export let initialContent: string | undefined = undefined
export let textNodeActions: TextNodeAction[] = []
export let editorAttributes: { [name: string]: string } = {}
@ -347,7 +347,7 @@
{#if visible}
{#if comparedVersion !== undefined || $$slots.tools}
<div class="ref-container" class:autoOverflow>
<div class="ref-container" style:overflow>
{#if comparedVersion !== undefined}
<div class="flex-row-center buttons-group xsmall-gap">
<StyleButton
@ -394,7 +394,7 @@
/>
</div>
<div class="ref-container" class:autoOverflow>
<div class="ref-container" style:overflow>
<div class="text-input" class:focusable>
<div class="select-text" style="width: 100%;" bind:this={element} />
</div>
@ -402,10 +402,6 @@
{/if}
<style lang="scss">
.autoOverflow {
overflow: auto;
}
.ref-container .formatPanel {
margin: -0.5rem -0.25rem 0.5rem;
padding: 0.375rem;

View File

@ -8,7 +8,7 @@
}
.text-editor-view {
overflow-y: auto;
// overflow-y: auto;
color: var(--theme-text-primary-color);
.title,