On a phone, stray taps in SilverBullet open the keyboard while you only meant to read or scroll. Mr.Red's Tap Shield library fixes this. It makes the page act read-only until you double-tap or long-press. This setup switches it on by itself on phone-sized screens.

Setup

  1. In SilverBullet's Library Manager, add Mr.Red's library repository:
https://github.com/Mr-xRed/silverbullet-libraries/blob/main/Repository/Mr-xRed.md
  1. From that repository, install the library DisableAccidentalMobileTaps.
  2. Open your CONFIG page, add a space-lua code block (three backticks followed by space-lua) and paste this code inside it:
-- switch the Tap Shield on whenever a page loads on a phone-sized screen
event.listen {
  name = "editor:pageLoaded",
  run = function()
    if js.window.innerWidth <= 700 then setupStreamlinedShield() end
  end
}
  1. Run the command System: Reload.

The library has its own switch-on code, turned off. Setting it in CONFIG instead means an update to the library won't undo it.

Use

  • On the phone, single taps scroll and follow links, but don't open the keyboard.
  • Double-tap or long-press to start typing. Tap away and it locks again.
  • The command Mobile: Toggle Accidental Tap Shield turns it off or on until the next refresh.