Skip to content

fix(invoice): keep Submit reachable on Add Lightning Invoice when keyboard is open (#635)#636

Open
codaMW wants to merge 1 commit into
MostroP2P:mainfrom
codaMW:fix/invoice-submit-keyboard-635
Open

fix(invoice): keep Submit reachable on Add Lightning Invoice when keyboard is open (#635)#636
codaMW wants to merge 1 commit into
MostroP2P:mainfrom
codaMW:fix/invoice-submit-keyboard-635

Conversation

@codaMW

@codaMW codaMW commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What

Wraps the invoice form in add_lightning_invoice_widget.dart in a SingleChildScrollView so it scrolls instead of overflowing when the soft keyboard is open.

Root cause

build returned a bare Column containing a 6-line invoice TextFormField. When the keyboard opens, the Scaffold shrinks the available height; on some screen geometries the Column overflows and the Cancel/Submit Row is pushed past the hittable area the button renders but its tap target is clipped, so Submit does nothing. Dismissing the keyboard restores the viewport and it works again.

Fix

Wrapping the Column in a SingleChildScrollView keeps Submit reachable on any screen size. The -w diff shows the real change is just the wrapper; the rest is dart format reflow.

Testing

  • flutter analyze: no issues.
  • Reached the Add Lightning Invoice screen via a full local E2E, but the bug did not reproduce on my device (Nokia C31) Submit worked with the keyboard open, and still worked when I forced a smaller viewport via split-screen. Consistent with the diagnosis: the overflow only occurs on certain screen geometries. The report is on a Pixel 8a / Android 16.
  • Verified no-regression on my C31: Submit still works and the form now scrolls with the keyboard open.
  • @wchancao, could you confirm this resolves it on your Pixel 8a? I couldn't trigger the original overflow locally.
1000150223

Summary by CodeRabbit

  • Bug Fixes
    • The Lightning invoice entry screen now scrolls, making it easier to use on smaller displays or when the keyboard is open.
    • Existing invoice input, cancel, and submit actions remain unchanged.

…stays reachable with keyboard open

Wraps the invoice form Column in a SingleChildScrollView. On smaller or
taller-keyboard viewports the Column overflowed when the soft keyboard
shrank the available height, clipping the Submit button's hit area so
taps did nothing (issue MostroP2P#635). Scrolling keeps the button reachable on
any screen size.

Fixes MostroP2P#635
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8f810581-9f4e-47a7-9b79-42d6aec726ee

📥 Commits

Reviewing files that changed from the base of the PR and between 9b275ec and 3f66112.

📒 Files selected for processing (1)
  • lib/shared/widgets/add_lightning_invoice_widget.dart

Walkthrough

The build method of the lightning invoice widget is updated so its content is wrapped in a SingleChildScrollView instead of a plain Column, while retaining the same instruction text, form field, and cancel/submit buttons.

Changes

Scrollable Lightning Invoice Widget

Layer / File(s) Summary
Scrollable layout wrapper
lib/shared/widgets/add_lightning_invoice_widget.dart
The build method now returns a SingleChildScrollView wrapping the existing Column of instruction text, TextFormField, and cancel/submit buttons.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

A hop, a scroll, a widget grows tall,
No content squeezed, no overflow call,
The buttons still wired, the text field the same,
Just wrapped in a scroll so nothing's to blame,
This rabbit approves with a wiggle of tail! 🐇📜

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: making the Add Lightning Invoice submit action reachable when the keyboard is open.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant