feat: Changed floating toolbar in Super to be always visible above keyboard on mobile (#2188)

This commit is contained in:
Aman Harwara
2023-01-31 13:38:45 +05:30
committed by GitHub
parent 682c1cc603
commit ba67f8b8ce
3 changed files with 36 additions and 6 deletions

View File

@@ -17,6 +17,13 @@ export function setFloatingElemPosition(
): void {
const scrollerElem = anchorElem.parentElement
const isMobileScreen = window.innerWidth < 768
if (isMobileScreen) {
floatingElem.style.opacity = '1'
return
}
if (targetRect === null || !scrollerElem) {
floatingElem.style.opacity = '0'
floatingElem.style.transform = 'translate(-10000px, -10000px)'