Skip to content

Commit 6d54fe1

Browse files
author
Tom Adam
committed
[pstanoev#177] Added event handler for window scroll - list needs to be re-positioned.
1 parent 988c31e commit 6d54fe1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/SimpleAutocomplete.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,6 @@
11041104
}
11051105
}
11061106
</script>
1107-
11081107
<div
11091108
class="{className ? className : ''} autocomplete select is-fullwidth {uniqueId}"
11101109
class:hide-arrow={hideArrow || !items.length}
@@ -1237,7 +1236,7 @@
12371236
</div>
12381237
</div>
12391238

1240-
<svelte:window on:click={onDocumentClick} />
1239+
<svelte:window on:click={onDocumentClick} on:scroll={() => setPositionOnNextUpdate = true} />
12411240

12421241
<style>
12431242
.autocomplete {

0 commit comments

Comments
 (0)