mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 11:42:30 +03:00
Removed overflow in the TextEditor. Panel fix. (#3840)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
parent
945f295336
commit
d5d98f64e7
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -8,7 +8,7 @@
|
||||
}
|
||||
|
||||
.text-editor-view {
|
||||
overflow-y: auto;
|
||||
// overflow-y: auto;
|
||||
color: var(--theme-text-primary-color);
|
||||
|
||||
.title,
|
||||
|
Loading…
Reference in New Issue
Block a user