Tone down scrolling behaviour after user test

This commit is contained in:
Pieter Vander Vennet 2024-09-11 17:36:08 +02:00
parent 86490643b6
commit d62974b1e3

View file

@ -48,16 +48,13 @@
}
let htmlElem: HTMLDivElement
$: {
if (editMode && htmlElem !== undefined && config.IsKnown($tags)) {
// EditMode switched to true yet the answer is already known, so the person wants to make a change
// Make sure that the question is in the scrollview!
function enableEditMode(){
// EditMode switched to true yet the answer is already known, so the person wants to make a change
// Make sure that the question is in the scrollview!
window.setTimeout(() => {
// Some delay is applied to give Svelte the time to render the _question_
window.setTimeout(() => {
Utils.scrollIntoView(<any>htmlElem)
}, 50)
}
Utils.scrollIntoView(<any>htmlElem)
}, 50)
}
const _htmlElement = new UIEventSource<HTMLElement>(undefined)
@ -132,9 +129,7 @@
<EditButton
arialabel={config.editButtonAriaLabel}
ariaLabelledBy={answerId}
on:click={() => {
editMode = true
}}
on:click={() => enableEditMode()}
/>
{/if}
</div>