Skip to content

Bug: Paste fails on Firefox due to asynchronous clipboard read (NotAllowedError) #919

Open
logseq/logseq
#13892

Description

@asano69

Search first

  • I searched and no similar issues were found

What Happened?

When attempting to paste text or content into the Logseq web app on Firefox, the paste operation fails, and the following error is thrown in the developer console:
DOMException NotAllowedError: Clipboard read operation is not allowed.

This issue occurs because Logseq attempts to read the clipboard asynchronously (e.g., using navigator.clipboard.read or readText) after the initial paste event. Firefox has a strict security policy that blocks any asynchronous clipboard read operations unless a specific development flag (dom.events.testing.asyncClipboard) is enabled in about:config, which is insecure for daily use.

Unlike Logseq, most other web apps (like Notion, GitHub, etc.) handle pasting successfully on Firefox because they extract the clipboard data synchronously within the native paste event handler.

Reproduce the Bug

  1. Open Logseq Web app (e.g., https://test.logseq.com/ or a self-hosted instance) using Firefox.
  2. Copy any text from an external source.
  3. Click on a block in Logseq and press Ctrl + V (or Cmd + V on macOS) to paste.
  4. Notice that nothing is pasted into the block.
  5. Open the browser's Developer Tools (F12) -> Console, and you will see the NotAllowedError: Clipboard read operation is not allowed. error.

Expected Behavior

Pasting should work seamlessly on Firefox without requiring users to change risky about:config settings.

To resolve this fundamentally, Logseq should be updated to extract clipboard data synchronously within the paste event handler using e.clipboardData.getData('text/plain') (and 'text/html'), rather than requesting it asynchronously later via the Clipboard API.

Screenshots

No response

Files

No response

Browser, Desktop or Mobile Platform Information

Firefox 150.0.1
https://test.logseq.com/ (2026-06-05)

Additional Context

No response

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

  • I'm willing to submit a PR (Thank you!)

Activity

  1. yuxi-liu-wired commented on Oct 27, 2026

    @yuxi-liu-wired

    Fixed in logseq/logseq#13892 (fix(clipboard): copy, cut and paste keep working when Firefox refuses a clipboard call). Its description has the cause and the test that pins it; it fails on current master and passes with the fix.

  2. added 11 commits that reference this issue on Oct 29, 2026
    00d2a85
    f041028
    a2e6034
    25dc285
    bc8f76a
    db40d33
    ee11e9c
    80c6e81
    fae27f3
    040947e
    295f730
  3. added 3 commits that reference this issue on Nov 11, 2026
    2046b6d
    dc4f6c5
    a4011cf
  4. 16 remaining items

  5. added 15 commits that reference this issue on Nov 17, 2026
    1026134
    79c2fb7
    5c0d4e5
    a42cdc2
    d0f7077
    1a33f4f
    fd7f6b9
    7395f35
    b49d547
    4c9dee0
    0c137ff
    1fb94b2
    e75840c
    28804e2
    9a78b26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions