Skip to content

Instantly share code, notes, and snippets.

@Stnaire
Stnaire / keyboard-scroll-adjuster.directive.ts
Last active December 14, 2018 17:16
[Ionic 3] Keep focused form input in visible area when keyboard is opened
import { Directive, ElementRef, Inject, OnDestroy, OnInit, Renderer2 } from "@angular/core";
import { DOCUMENT } from "@angular/common";
import { proxy } from "utils";
import { easeOutCubic } from "easing";
@Directive({
selector: '[keyboard-scroll-adjuster]'
})
export class KeyboardScrollAdjusterDirective implements OnInit, OnDestroy {
/**