Skip to content

Commit e95f088

Browse files
authored
Account for scroll offset with positioning search completion box (#8190)
1 parent c2f0460 commit e95f088

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/web_app/lib/src/widget/completion/widget.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ final class _CompletionWidget {
272272
// Update dropdown position
273273
dropdown.style
274274
..display = 'block'
275-
..left = '${inputBoundingRect.left + caretOffset}px'
276-
..top = '${inputBoundingRect.bottom}px';
275+
..left = '${inputBoundingRect.left + caretOffset + window.scrollX}px'
276+
..top = '${inputBoundingRect.bottom + window.scrollY}px';
277277

278278
// Apply selectedOptionClass to selected option
279279
if (state.suggestions.isNotEmpty) {

0 commit comments

Comments
 (0)