You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit db9aa9d
Browse filesBrowse the repository at this point in the historyBrowse files
feat(keyboard): ride UIKit's keyboard motion in Safari on iOS
The keyboard layout guide reads UIKit's keyboard schedule where WebKit
on iOS runs. Core's surfaces ride UIKit's measured keyboard spring: the
show from Safari's one report, the hide from the blur.
Records: AST-099 FR6, FR8, DEC-12.
[docs] The browser-support guide's on-screen keyboard section describes the ride in Safari on iOS: ChatLayout's composer and a Tall BottomSheet's focused field ride UIKit's keyboard motion, the scroll room stays until Safari reports the keyboard gone, and the ride starts once the page has loaded Core's touch support.
[feat] In Safari on iOS, ChatLayout's composer and a Tall BottomSheet's focused field ride the on-screen keyboard on UIKit's own keyboard motion. They rise from Safari's report as the keyboard starts up; before, they moved up in one step. The composer also goes down from the blur that takes the keyboard down, as the sheet already did. The ride starts once the page has loaded Core's touch support, shortly after first paint; before that, they move in one step. Chrome on Android and Firefox for Android are unchanged. Under Reduce Motion nothing travels.
Copy file name to clipboardExpand all lines: packages/cli/assets/docs/browser-support.doc.mjs
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -154,6 +154,10 @@ export const docs = {
154
154
type: 'prose',
155
155
text: 'In Chrome on Android, ChatLayout\u2019s composer rides the keyboard as Gboard slides it up and down. A Tall BottomSheet\u2019s focused field rides the keyboard as Gboard slides it up, and as Gboard slides it down after the field loses focus. The scroll room stays until the keyboard is down. A hide Chrome reports late, such as Back, which keeps the focus, rides down from Chrome\u2019s report. When the keyboard is reported, the sheet places the field just above it in that same frame, so Chrome has no covered field to pan to; if Chrome pans anyway, the sheet puts the page back when that pan ends. Chrome follows your viewport setting, which Astryx documents and never sets: your app owns its viewport `<meta>` element. By default (`interactive-widget=resizes-visual`) Chrome lays the keyboard over the page and pans to a focused field elsewhere on the page. With `interactive-widget=resizes-content` it shrinks the layout viewport instead, so content anchored to the bottom sits above the keyboard, and those components measure no keyboard and change nothing: the browser has already made the room.',
156
156
},
157
+
{
158
+
type: 'prose',
159
+
text: 'In Safari on iOS, in the browser and as a home-screen app, ChatLayout\u2019s composer and a Tall BottomSheet\u2019s focused field ride the keyboard on UIKit\u2019s own keyboard motion. They rise from Safari\u2019s report of the keyboard, which comes as the keyboard starts up, and go down from the blur that takes the keyboard down. Safari reports the keyboard gone only once it is down, so the scroll room stays until then. The ride starts once the page has loaded Core\u2019s touch support, shortly after first paint; before that, they move in one step.',
Copy file name to clipboardExpand all lines: packages/core/src/BottomSheet/BottomSheet.doc.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,7 @@ export const docs = {
152
152
name: 'height',
153
153
type: "'hug' | 'capped' | 'tall' | number | string",
154
154
description:
155
-
"How tall the sheet is. Named budgets: 'hug' fits its content up to 92% of the viewport, 'capped' is a scrolling mid-height panel (~62%), and 'tall' is a pinned near-full panel (~92%) for content that streams in. Or pass a number (px) / CSS length for a custom budget. Give snapPoints to let the user drag between heights. On shorter viewports the sheet fills the available height. Only a fully expanded 'tall' sheet provides mobile-keyboard accommodation: it stays put and scrolls each focused control above the keyboard. Hug, Capped, numeric and CSS-length heights never do, and a Tall sheet stops doing it the moment the user drags it to a shorter detent, resuming when they drag it back. Outside that state the sheet neither moves nor adds keyboard scroll space, and the browser's own focus reveal is left in place; on iOS that reveal can shift the whole page. This accommodation applies where the visual viewport shrinks for the keyboard, as in Safari on iOS, Firefox for Android and Chrome on Android, where the sheet places the focused control just above the keyboard as it comes up, and the control rides the rest of Gboard\u2019s slide up, and the slide down after it loses focus; a hide Chrome reports late, such as Back, rides down from Chrome\u2019s report (`astryx docs browser-support`).",
155
+
"How tall the sheet is. Named budgets: 'hug' fits its content up to 92% of the viewport, 'capped' is a scrolling mid-height panel (~62%), and 'tall' is a pinned near-full panel (~92%) for content that streams in. Or pass a number (px) / CSS length for a custom budget. Give snapPoints to let the user drag between heights. On shorter viewports the sheet fills the available height. Only a fully expanded 'tall' sheet provides mobile-keyboard accommodation: it stays put and scrolls each focused control above the keyboard. Hug, Capped, numeric and CSS-length heights never do, and a Tall sheet stops doing it the moment the user drags it to a shorter detent, resuming when they drag it back. Outside that state the sheet neither moves nor adds keyboard scroll space, and the browser's own focus reveal is left in place; on iOS that reveal can shift the whole page. This accommodation applies where the visual viewport shrinks for the keyboard, as in Safari on iOS, Firefox for Android and Chrome on Android, where the sheet places the focused control just above the keyboard as it comes up, and the control rides the rest of Gboard\u2019s slide up, and the slide down after it loses focus; a hide Chrome reports late, such as Back, rides down from Chrome\u2019s report. In Safari on iOS the content rides UIKit\u2019s keyboard motion, up from Safari\u2019s report and down from the blur (`astryx docs browser-support`).",
it('subscribes no keyboard layout guide where the keyboard moves on Safari\u2019s schedule, whose transitions the sheet never rides (spec:AST-099 FR8)',()=>{
3125
-
// iOS Safari and Firefox for Android have no VirtualKeyboard API, so the
3126
-
// guide has no profile there. The sheet subscribes no guide, and its
3127
-
// room follows the keyboard's reports.
3133
+
it('subscribes no keyboard layout guide where the browser has no keyboard schedule, as Firefox for Android (spec:AST-099 FR8)',()=>{
3134
+
// Firefox for Android has neither the VirtualKeyboard API nor UIKit's
3135
+
// keyboard, so the guide has no profile there. The sheet subscribes no
3136
+
// guide, and its room follows the keyboard's reports.
0 commit comments