1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

fixed text inputs

This commit is contained in:
muerwre 2019-07-30 13:58:41 +07:00
parent 3ba862ee5e
commit 7ae8205e27
5 changed files with 34 additions and 22 deletions

View file

@ -12,8 +12,9 @@ export const SidePane: FC<IProps> = ({
const [left, setLeft] = useState(0);
const moveThis = useCallback(() => {
const shift = window.innerWidth > (content_width + 64 + 20)
? ((window.innerWidth - content_width - 64 - 20) / 2) - 54 + 64 // + content_width + 74
const { width } = document.body.getBoundingClientRect();
const shift = width > (content_width + 64 + 20)
? ((width - content_width - 64 - 20) / 2) - 54 + 64 // + content_width + 74
: 10;
setLeft(shift);