Логотип Ios Keyboard Page Shift

Ios Keyboard Page Shift

Организация
etherfunlab
ios-keyboard-page-shift

Use when, on iPhone Safari or an iOS WebView, a page or a full-screen app shell (top bar, scrolling list, bottom input) moves up when a text field is focused and stays up after the keyboard closes, leaving the top bar off-screen, the input mid-screen and an empty band below it, or when an earlier fix for that symptom did not hold.

Обзор

Издательetherfunlab
Репозиторийworkflow
Название навыкаios-keyboard-page-shift
Звёзды
75
Форки
17
Файлы в комплекте
1
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 1

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — etherfunlab. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Ios Keyboard Page Shift в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/etherfunlab/workflow/tree/main/skills/ios-keyboard-page-shift/agent/skills/ios-keyboard-page-shift
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/etherfunlab/workflow.git /tmp/workflow
mkdir -p .claude/skills
cp -r /tmp/workflow/skills/ios-keyboard-page-shift/agent/skills/ios-keyboard-page-shift .claude/skills/ios-keyboard-page-shift
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Ios Keyboard Page Shift в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Ios Keyboard Page Shift, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Ios Keyboard Page Shift не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

iOS keyboard page shift

Overview

To show a focused field above the soft keyboard, iOS scrolls two kinds of things: every ancestor of the field that is a scroll container with room to scroll, and the document itself. Either one can be left displaced after the keyboard closes, and both give the same screenshot. Find which layer moved before fixing anything; a fix on the other layer changes nothing.

Step 1: find the layer

Look at what fills the band below the input.

Band below the inputLayer that movedFix
The app's own background, continuous with the rest of the screenan inner scroll containerA
The bare html/body color, with a hard edge where the app's background endsthe documentB

Confirm on the device: Safari on a Mac → Develop → the iPhone, focus the field, close the keyboard, then run:

js
for (let el = document.activeElement; el; el = el.parentElement) {
  const oy = getComputedStyle(el).overflowY
  if (oy !== 'visible' && oy !== 'clip' && el.scrollHeight > el.clientHeight) console.log(el, oy, el.scrollTop)
}
console.log('document', scrollY, visualViewport.offsetTop, visualViewport.height, innerHeight, document.documentElement.scrollHeight)

Any listed element other than the list that is meant to scroll, or with a non-zero scrollTop, means Fix A. scrollY above scrollHeight - innerHeight means Fix B. Both can be true; do A, then B.

Fix A: no outer layer can scroll

An ancestor of the field is a scroll container (overflow auto, scroll or hidden; hidden still scrolls for scripts and for iOS) and has scrollable overflow. The usual source is an absolutely positioned descendant (an sr-only label, a badge, a tooltip) whose containing block lies outside the element meant to scroll. It neither scrolls nor clips with that element, stays at its unscrolled position as far down as the list is long, and adds to the overflow of the next scroll container up.

  1. Make the element meant to scroll the containing block: position: relative on it.
  2. Give shell layers that must never scroll overflow: clip. It clips like hidden but is not a scroll container, so nothing can park it off-axis.

Find escaped elements with list set to the element meant to scroll:

js
for (const el of list.querySelectorAll('*'))
  if (getComputedStyle(el).position === 'absolute' && !list.contains(el.offsetParent)) console.log(el, el.offsetParent)

Fix B: clamp the document after the keyboard closes

iOS should clamp the document back into range when the keyboard closes. From iOS 26 it sometimes does not; WKWebView on iOS 11 to 13.3 had the same bug. Install keyboard-scroll-restore.js (next to this file) once per page load, client side only. It clamps scrollY into [0, scrollHeight - innerHeight] when either:

  • the visual viewport goes from at least 150 px shorter than innerHeight (zoom factored out) back to full: a keyboard closed while focus stayed on the field;
  • 400 ms after a focusout that leaves no input, textarea, select or contenteditable focused: Done, or a send button that blurs. This covers iOS never reporting the viewport growing back, or reporting it before it settles its own scroll.

Each condition is load-bearing:

ConditionWithout it
clamp to the range, not to 0pages that scroll as the document jump to the top
keyboard counted as closed within 150 px of innerHeightiOS 26 can leave the viewport ~24 px short, so an exact-equality check never fires
act only once the keyboard is downthe field gets pulled under the keyboard
wait out the hide animationiOS undoes a clamp made mid-animation
skip when focus moved to another fieldthe page jumps while the user moves between fields

Verify

Only a real iPhone shows this; desktop Safari and Playwright WebKit have no soft keyboard. Close the keyboard with Done and with the send button, move focus between two fields, and on a long page scrolled halfway close the keyboard from a field (the position must stay). If the fix does not hold, log the document line from Step 1 on the device before changing anything.

Common mistakes

MistakeWhat happens
Painting the app background on htmlThe band looks right; the page is still shifted
position: fixed on body or the rootBreaks pages that scroll as the document; iOS still pans the visual viewport
Resizing the shell to visualViewport.height on every resizeJitters as Safari's toolbar collapses
Fixing layer A when the band is the bare canvasNothing changes

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Ios Keyboard Page Shift?

Use when, on iPhone Safari or an iOS WebView, a page or a full-screen app shell (top bar, scrolling list, bottom input) moves up when a text field is focused and stays up after the keyboard closes, leaving the top bar off-screen, the input mid-screen and an empty band below it, or when an earlier fix for that symptom did not hold.

Зачем использовать Ios Keyboard Page Shift в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Ios Keyboard Page Shift — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Ios Keyboard Page Shift в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/etherfunlab/workflow/tree/main/skills/ios-keyboard-page-shift/agent/skills/ios-keyboard-page-shift. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Ios Keyboard Page Shift?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Ios Keyboard Page Shift?

С любым количеством. В TypingMind вы можете использовать Ios Keyboard Page Shift с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Ios Keyboard Page Shift?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — etherfunlab. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇