Skip to content

fix(ui-egui): a click under a new page's date starts writing (#148) - #185

Merged
DWAA1660 merged 1 commit into
AlienTechSoftware:mainfrom
DWAA1660:fix/new-page-blank-click
Nov 12, 2026
Merged

DWAA1660 merged 1 commit into
AlienTechSoftware:mainfrom
DWAA1660:fix/new-page-blank-click

Conversation

@DWAA1660

Copy link
Copy Markdown
Collaborator

What and why

Fixes #148. A new page's only box holds its date line, and container_content_height deliberately draws that box INITIAL_PAGE_LINES tall, which is the big outlined area the issue shows. The date paragraph is the only widget inside it, though, so a click anywhere below the date hit nothing. No caret appeared and typed text was lost. Only clicking the date itself (then Enter) worked.

containers::show now gives that blank area under the date its own click target, but only for a box whose single block is the page stamp (pageedit::is_page_stamp). A click there inserts an empty paragraph after the date in the same box and puts the caret on it, mirroring the existing handler that fills an empty box (start_in). Once the box holds more than the date it sizes to its content as before, so this only affects a fresh page.

How it was checked

  • New UI test a_click_under_a_new_pages_date_starts_writing, for HTML and CMGFM pages created with node.create:
    • a click just under the date, and one further down, each give a caret
    • the typed TEST EMPTY AREA is in the saved page
    • Fails without the fix (caret: null, as in the issue), and passes with it
  • cargo test -p notecraft-ui-egui: all pass (302 unit, 203 UI)
  • cargo fmt --all -- --check, cargo clippy -p notecraft-ui-egui --all-targets -- -D warnings: clean

🤖 Generated with Claude Code

A new page's box holds only its date and is drawn tall, like OneNote's
first note area, but nothing under the date took a click: the space
looked ready for writing, no caret appeared, and what was typed was lost
(AlienTechSoftware#148). A click there now adds a line under the date, in the same box,
and puts the caret on it.

Fixes AlienTechSoftware#148

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DWAA1660
DWAA1660 merged commit c5eef10 into AlienTechSoftware:main Nov 12, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] A new page's large blank note area ignores clicks and typing until the timestamp itself is clicked

1 participant