# @hz-fix/fix-ios-12-keyboard-bug

> iOS12键盘Bug补丁

Latest version **1.0.0** (published 2022-04-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install @hz-fix/fix-ios-12-keyboard-bug
pnpm add @hz-fix/fix-ios-12-keyboard-bug
yarn add @hz-fix/fix-ios-12-keyboard-bug
bun add @hz-fix/fix-ios-12-keyboard-bug
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-04-27 |
| First published | 2022-04-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | hzins |

## Links

- npm: https://www.npmjs.com/package/@hz-fix/fix-ios-12-keyboard-bug
- npm.io page: https://npm.io/package/@hz-fix/fix-ios-12-keyboard-bug

## Recent versions

- 1.0.0 (latest) — 2022-04-27

## README

# iOS12 键盘 Bug 补丁

## 详细信息

https://github.com/WebKit/webkit/commit/ec5ad1bd1bae03e0f85e4415e018ea5d09e046c1

```
2019-09-06  Darryl Pogue  <darryl@dpogue.ca>

        REGRESSION(iOS 12): Keyboard dismissal leaves WKWebView viewport-fit=cover content offscreen
        https://bugs.webkit.org/show_bug.cgi?id=192564

        Reviewed by Tim Horton.

        The new keyboard height was being read into a variable after the scrollview had already been
        adjusted. This worked when the keyboard was opening, because the scrollview is adjusted with
        the correct value a second time when the keyboard animation has finished. However, when the
        keyboard is closed, the adjustment was being made before the correct height was stored,
        leading to the scrollview being positioned as if the keyboard were still open.

        * UIProcess/ios/WKScrollView.mm:
        (-[WKScrollView _adjustForAutomaticKeyboardInfo:animated:lastAdjustment:]):
```

## 构建

```
npm install
npm run build
```

## 发布

```
npm publish
```

## 使用说明

### webpack

```
import fix-ios-12-keyboard-bug;
```

### 非 Webpack

```
npm install fix-ios-12-keyboard-bug

把node_module/fix-ios-12-keyboard-bug/dist/fix-ios-12-keyboard-bug.min.js通过gulp或者直接复制到静态资源文件夹下直接通过script标签引入即可
```

---
_Source: https://npm.io/package/@hz-fix/fix-ios-12-keyboard-bug · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
