Phone bar: block bar falls back to the tab bar after a tap; bar floats too high in the installed app #290

Closed
opened 2026-10-14 14:15:56 +00:00 by kayg · 2 comments
Owner

kayg (2026-10-14 19:42 IST, iPhone, installed app on calternal.cloud, dark, today's daily note):

  1. "There was the block customisation toolbar, I clicked on something and it changed to the tab bar?" The block bar (Body ▾, →, link, copy, delete, ✓) gave way to the note tabs (note / style) after a tap, without kayg pressing ✓.
  2. "It should also sit further down normally on mobile?" In the installed app (no Safari toolbar) the bar floats about 110 pt above the bottom edge, leaving a big empty band under it.

Wanted:

  1. The block bar stays until the person dismisses it: ✓, tapping into text (which then shows the text bar, per #268), Escape, or a selection being cleared on purpose. A tap on the bar itself, its sheets, a chip or a link inside the selected block must never quietly switch to the tab bar. Find which taps do it (log every mode change with its reason), fix the rule in the shared mode picker (#269), and add a test covering each tap target.
  2. On phones the bar sits just above the home indicator: bottom: max(env(safe-area-inset-bottom), 8px) + small gap, both in the standalone PWA and in Safari, where it already clears the toolbar. When the keyboard is up, it rides on top of the keyboard (as #268 has it). Check at 320/375/390/430 in the installed (standalone) display mode and in the browser.
kayg (2026-10-14 19:42 IST, iPhone, installed app on calternal.cloud, dark, today's daily note): 1. "There was the block customisation toolbar, I clicked on something and it changed to the tab bar?" The block bar (Body ▾, →, link, copy, delete, ✓) gave way to the note tabs (note / style) after a tap, without kayg pressing ✓. 2. "It should also sit further down normally on mobile?" In the installed app (no Safari toolbar) the bar floats about 110 pt above the bottom edge, leaving a big empty band under it. **Wanted:** 1. The block bar stays until the person dismisses it: ✓, tapping into text (which then shows the text bar, per #268), Escape, or a selection being cleared on purpose. A tap on the bar itself, its sheets, a chip or a link inside the selected block must never quietly switch to the tab bar. Find which taps do it (log every mode change with its reason), fix the rule in the shared mode picker (#269), and add a test covering each tap target. 2. On phones the bar sits just above the home indicator: `bottom: max(env(safe-area-inset-bottom), 8px) + small gap`, both in the standalone PWA and in Safari, where it already clears the toolbar. When the keyboard is up, it rides on top of the keyboard (as #268 has it). Check at 320/375/390/430 in the installed (standalone) display mode and in the browser.
Author
Owner

More from kayg (19:49 IST, iPhone, installed app):
3. The block toolbar's buttons need a long press to fire; a single tap does nothing. That's a bug. Every bar button must work on one ordinary tap. Likely suspects: the never-steal-focus pointerdown preventDefault, a touch handler swallowing the click, or the tap landing during a mode switch. Test with real touch events (hasTouch, touchscreen.tap) in WebKit.
4. Selecting a block on a phone stays as decided (G1): a swipe either way, or a tap on the block's edge or bullet. A tap on the text types. kayg says long-press-to-select doesn't seem to work now. Make sure swipe and edge-tap both work, and test both.

More from kayg (19:49 IST, iPhone, installed app): 3. **The block toolbar's buttons need a long press to fire; a single tap does nothing.** That's a bug. Every bar button must work on one ordinary tap. Likely suspects: the never-steal-focus `pointerdown` preventDefault, a touch handler swallowing the click, or the tap landing during a mode switch. Test with real touch events (`hasTouch`, `touchscreen.tap`) in WebKit. 4. **Selecting a block on a phone stays as decided (G1):** a swipe either way, or a tap on the block's edge or bullet. A tap on the text types. kayg says long-press-to-select doesn't seem to work now. Make sure swipe and edge-tap both work, and test both.
Author
Owner

PR #308 is built on #283 → #280. It covers all four points.

1. Which taps dropped the block bar. Each tap target now has its own test (e2e/bar-stays.spec.ts), and every bar change is logged with its reason. Without the fix, three of them dropped the block bar:

  • Focus moving away (the keyboard going down);
  • a tap outside the note (its top bar);
  • Copy link on the block bar itself.

All three come from one cause. A selected block is a selection across one line. The next editor update (the focus change) re-read it as selected words, then as nothing, and nothing means tabs or tools. The block selection now stays one until you put it down: ✓, Esc, or a tap into the text.

The other targets behave as expected:

  • A sheet opened from the bar goes back to the block bar when it closes.
  • A link chip either opens its note, or leaves the block selected.
  • The empty last bullet and another block's words put the caret there, so the text bar shows.

2. Resting height. The bar now sits at max(safe-area, 8px) + 6px above the bottom of what you can see, corrected from the visual viewport. Checked at 320, 375, 390 and 430, in the installed shape (display-mode: standalone, 34 px home indicator) and the Safari shape (no inset).

Note for #293: if the installed app's page box itself ends above the screen, the bar now sits whole on that box's bottom edge (the right-hand screenshot below). The box is #293's to size.

Installed app at 320 / 375 / 390 / 430, then Safari at 390, then a page box ending 66 px short at 390:
webkit-rest-installed-320.png webkit-rest-installed-375.png webkit-rest-installed-390.png webkit-rest-installed-430.png webkit-rest-safari-390.png webkit-rest-installed-short-box-390.png

3. Long press needed. Reproduced with real touch in WebKit (hasTouch and isMobile, touchscreen.tap). The never-steal-focus rule cancelled the touch's pointerdown, and WebKit then sends no click: the event log showed pointerdown, touchstart, pointerup, touchend, and never a click. All four block-bar buttons missed. Now only a mouse's pointerdown is cancelled. For a finger, the mousedown that follows the lift is cancelled instead, which still keeps focus in the text. e2e/bar-taps.spec.ts taps every control with real touch in WebKit and Chromium, and none miss:

  • note tools: 4 controls;
  • text bar: 7;
  • block bar: 4;
  • Style sheet: 14.

4. Selecting a block by touch. A swipe across a block (either way), or a tap on its left edge or its bullet, selects it. The keyboard stays down. A tap on the words types. A swipe that starts at the screen's left edge stays swipe-back. Tested in e2e/touch-select.spec.ts.


Phone check for kayg, in the installed app and in Safari:

  1. Open today's note with the keyboard down. The bar sits just above the home indicator, with no big empty band under it.
  2. Swipe across a line, either way: the block bar shows and the keyboard stays down. Tap the bullet, or the margin left of a line: the same.
  3. With the block bar up, tap each button once: Text ▾, link, copy, duplicate, delete, ✓. Each one acts on a single tap; none needs a long press.
  4. With a block selected, tap the note's top bar or close a sheet: the block bar stays. Tap into the words: the text bar shows. Tap ✓: the block bar goes.
  5. Tap into text, then B and I: one tap each, and the keyboard doesn't move.
PR #308 is built on #283 → #280. It covers all four points. **1. Which taps dropped the block bar.** Each tap target now has its own test (`e2e/bar-stays.spec.ts`), and every bar change is logged with its reason. Without the fix, three of them dropped the block bar: - **Focus moving away** (the keyboard going down); - **a tap outside the note** (its top bar); - **Copy link** on the block bar itself. All three come from one cause. A selected block is a selection across one line. The next editor update (the focus change) re-read it as selected words, then as nothing, and nothing means tabs or tools. The block selection now stays one until you put it down: ✓, Esc, or a tap into the text. The other targets behave as expected: - A sheet opened from the bar goes back to the block bar when it closes. - A link chip either opens its note, or leaves the block selected. - The empty last bullet and another block's words put the caret there, so the text bar shows. **2. Resting height.** The bar now sits at `max(safe-area, 8px) + 6px` above the bottom of what you can see, corrected from the visual viewport. Checked at 320, 375, 390 and 430, in the installed shape (`display-mode: standalone`, 34 px home indicator) and the Safari shape (no inset). Note for **#293**: if the installed app's page box itself ends above the screen, the bar now sits whole on that box's bottom edge (the right-hand screenshot below). The box is #293's to size. Installed app at 320 / 375 / 390 / 430, then Safari at 390, then a page box ending 66 px short at 390: ![webkit-rest-installed-320.png](https://git.kayg.org/attachments/7f5d31ed-ac7a-4304-9954-68685d8540e1) ![webkit-rest-installed-375.png](https://git.kayg.org/attachments/9fa0e561-ddfb-4079-b758-6562563bc3db) ![webkit-rest-installed-390.png](https://git.kayg.org/attachments/555a21d6-d0a6-4e5d-bcd6-41652cf9070d) ![webkit-rest-installed-430.png](https://git.kayg.org/attachments/7f18e495-958a-4a1d-acfe-f5189985e08e) ![webkit-rest-safari-390.png](https://git.kayg.org/attachments/c9613a6e-98d7-4b5b-ae16-f3525d5baa54) ![webkit-rest-installed-short-box-390.png](https://git.kayg.org/attachments/c641f210-e24c-4c0a-ac62-f68dee13dfc9) **3. Long press needed.** Reproduced with real touch in WebKit (`hasTouch` and `isMobile`, `touchscreen.tap`). The never-steal-focus rule cancelled the touch's `pointerdown`, and WebKit then sends no click: the event log showed pointerdown, touchstart, pointerup, touchend, and never a click. All four block-bar buttons missed. Now only a mouse's pointerdown is cancelled. For a finger, the mousedown that follows the lift is cancelled instead, which still keeps focus in the text. `e2e/bar-taps.spec.ts` taps every control with real touch in WebKit and Chromium, and none miss: - note tools: 4 controls; - text bar: 7; - block bar: 4; - Style sheet: 14. **4. Selecting a block by touch.** A swipe across a block (either way), or a tap on its left edge or its bullet, selects it. The keyboard stays down. A tap on the words types. A swipe that starts at the screen's left edge stays swipe-back. Tested in `e2e/touch-select.spec.ts`. --- **Phone check for kayg**, in the installed app and in Safari: 1. Open today's note with the keyboard down. The bar sits just above the home indicator, with no big empty band under it. 2. Swipe across a line, either way: the block bar shows and the keyboard stays down. Tap the bullet, or the margin left of a line: the same. 3. With the block bar up, tap each button once: Text ▾, link, copy, duplicate, delete, ✓. Each one acts on a single tap; none needs a long press. 4. With a block selected, tap the note's top bar or close a sheet: the block bar stays. Tap into the words: the text bar shows. Tap ✓: the block bar goes. 5. Tap into text, then B and I: one tap each, and the keyboard doesn't move.
kayg closed this issue 2026-10-14 17:39:30 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#290
No description provided.