logseq / logseq

A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: http://trello.com/b/8txSM12G/roadmap
https://logseq.com
GNU Affero General Public License v3.0
31.13k stars 1.81k forks source link

Text is split with line breaks when copy-pasting from Firefox #9303

Open vibl opened 1 year ago

vibl commented 1 year ago

Search first

What Happened?

After copy-pasting a paragraph from Firefox into Logseq, new line breaks are added in the paragraph.

What makes it worse is that the first line break is always added after the first two or three words, which entirely breaks the layout of the paragraph (and requires systematically removing manually at least this line break).

For example:

Delegated access management means you can select a subset of roles for a given project and allow the granted organization to self-manage those roles for their users. Delegation is a highly useful feature for SaaS companies that have some sort of organization as customers, for example a B2B software provider. The SaaS provider wants to delegate the ability to manage access for certain roles of my service to customers or partners.

Is turned into:

Delegated access
 management means you can select a subset of roles for a given project 
and allow the granted organization to self-manage those roles for their 
users. Delegation is a highly useful feature for SaaS companies that 
have some sort of organization as customers, for example a B2B software 
provider. The SaaS provider wants to delegate the ability to manage 
access for certain roles of my service to customers or partners.

This happens only when copying from a fresh Firefox profile (or from Tor browser, which is Firefox based). Not from Chrome nor Chrome-based browsers.

Reproduce the Bug

Rename ~/.logseq so that a brand new config is created.

Copy-paste a paragraph from a web page in Firefox to a new graph.

Expected Behavior

No response

Screenshots

No response

Desktop or Mobile Platform Information

Logseq-linux-x64-0.9.4.AppImage Kubuntu 22.04 Firefox 112 and other Firefox-based browsers.

Additional Context

No response

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

jasonandersen commented 9 months ago

Can confirm this is happening to me as well on MacOS.

Does not happen when copying and pasting from Chrome.

App Version: 0.9.18 Git Revision: https://github.com/logseq/logseq/commit/6eb82e822aeca9cad4de4f5259e83a76b61c1cf6 Platform: Mozilla/5.0 (Macintosh Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML like Gecko) Logseq/0.9.18 Chrome/112.0.5615.204 Electron/24.6.3 Safari/537.36 Language: en-US Plugins: logseq-awesome-styler (v3.7.1)

Victor239 commented 1 month ago

This happens to me too, and only on Firefox.