logseq / logseq/db-test

Android: Hiding keyboard on empty block creates a stray empty block

Open
#1,114 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
28
Forks
2
PR merge metrics
No merged PRs in 30d

Description

### Search first

- [x] I searched and no similar issues were found

### What Happened?

On the Android app (DB beta), when the cursor is in an empty block and the
"hide keyboard" button is pressed, the empty block gets saved/persisted.
Below it, a greyed-out bullet then appears indicating where new content can
be inserted.

This happens consistently when:
- Tapping the greyed-out bullet to create a new block, then
- Hiding the keyboard before typing anything.

An empty current edit should not result in an empty block being committed.

### Reproduce the Bug

1. Open a page or the journal on the Android app (DB beta).
2. Tap the greyed-out bullet (the placeholder for inserting new content)
so the cursor is in a new, empty block.
3. Without typing anything, hide the keyboard — either via the Logseq
"hide keyboard" button or via the standard Android back gesture/button.
4. Observe: the empty block is saved and a new greyed-out bullet appears
below it.

Note: Reproduces on both journal pages and regular pages.

### Expected Behavior

When the current block is empty (no content entered), hiding the keyboard
should discard/collapse the empty block rather than persisting it. No empty
block should be left behind.

### Screenshots

_No response_

### Files

_No response_

### Browser, Desktop or Mobile Platform Information

- Device: OnePlus 13
- OS: Android 16
- Platform: Android
- App version: 2.0.1-alpha+nightly.20260819 (DB beta)

### Additional Context

- The issue is reproducible every time the steps above are followed.
- Happens regardless of how the keyboard is hidden (Logseq "hide keyboard"
button or standard Android back gesture/button).
- Happens on both journal pages and regular pages.
- Related behavior: tapping the greyed-out bullet to start a new block and
then hiding the keyboard commits the empty block instead of discarding it.

### Are you willing to submit a PR? If you know how to fix the bug.

- [ ] I'm willing to submit a PR (Thank you!)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue on an Android page and journal page using both the Logseq hide-keyboard control and the standard Android back action. Trace the keyboard-dismissal path for a newly created empty block and verify that hiding the keyboard discards it without leaving a persisted block or a new greyed-out bullet.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.