Skip to content

Commit

Permalink
Tone down scrolling behaviour after user test
Browse files Browse the repository at this point in the history
  • Loading branch information
pietervdvn committed Sep 11, 2024
1 parent 8649064 commit d62974b
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/UI/Popup/TagRendering/TagRenderingEditable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -132,9 +129,7 @@
<EditButton
arialabel={config.editButtonAriaLabel}
ariaLabelledBy={answerId}
on:click={() => {
editMode = true
}}
on:click={() => enableEditMode()}
/>
{/if}
</div>
Expand Down

0 comments on commit d62974b

Please sign in to comment.