UX: don't tether popper to the viewport if reference is out of the viewport (#17012)

followup to 

https://github.com/discourse/discourse/pull/16504

Internal

`/t/64811`

public

`/t/228953`
This commit is contained in:
Joe 2022-06-06 22:20:29 +08:00 committed by GitHub
parent 370df7ccb4
commit 5109ea0cf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -889,6 +889,8 @@ export default Component.extend(
name: "preventOverflow",
options: {
altAxis: !this?.site?.mobileView,
tetherOffset: ({ reference }) =>
Math.max(reference.y, document.documentElement.scrollTop),
},
},
{