Browse Source

Fix iOS Safari sticky input

master
Eduard Kuzmenko 3 years ago
parent
commit
260406a129
  1. 8
      src/helpers/dom/fixSafariStickyInput.ts

8
src/helpers/dom/fixSafariStickyInput.ts

@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
* https://github.com/morethanwords/tweb/blob/master/LICENSE
*/
import { doubleRaf } from "../schedulers";
export default function fixSafariStickyInput(input: HTMLElement) {
input.style.transform = 'translateY(-99999px)';
/* input.style.position = 'fixed';
@ -11,7 +13,8 @@ export default function fixSafariStickyInput(input: HTMLElement) { @@ -11,7 +13,8 @@ export default function fixSafariStickyInput(input: HTMLElement) {
input.style.left = '0'; */
input.focus();
setTimeout(() => {
// setTimeout(() => {
doubleRaf().then(() => {
//fastSmoothScroll(findUpClassName(input, 'scrollable-y') || window as any, document.activeElement as HTMLElement, 'start', 4, undefined, FocusDirection.Static);
/* input.style.position = '';
input.style.top = ''; */
@ -21,5 +24,6 @@ export default function fixSafariStickyInput(input: HTMLElement) { @@ -21,5 +24,6 @@ export default function fixSafariStickyInput(input: HTMLElement) {
/* setTimeout(() => {
fastSmoothScroll(findUpClassName(input, 'scrollable-y') || window as any, document.activeElement as HTMLElement, 'start', 4);
}, 50); */
}, 0);
});
// }, 0);
}

Loading…
Cancel
Save