apoorvapendse
421ba8afcf
paste: Prevent insertion of extraneous newlines in Firefox.
...
Firefox preserves the newlines when copying a visually
line-wrapped paragraph that originally contains zero
"intentional" newlines.
This fix removes those newlines from the text content before
pasting into the compose box.
This probably won't cause removall of intentional newlines,
as they are represented with <br/> tags in the `paste_html`.
Original report: https://rust-lang.zulipchat.com/#narrow/channel/122653-zulip/topic/Copy-paste.20includes.20hard.20newlines.20when.20message.20didn't/with/544174740
Discussion: https://chat.zulip.org/#narrow/channel/9-issues/topic/extraneous.20newlines.20when.20pasting.20in.20Firefox/with/2275319
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com >
Co-authored-by: Alex Vandiver <alexmv@zulip.com >
2025-10-27 16:19:22 -07:00
Evy Kassirer
10a815cae7
stream_data: Rename add_sub to add_sub_for_tests.
2025-09-30 12:52:47 -07:00
apoorvapendse
407b6f64c4
compose_paste: Paste as image for LibreOffice Calc content.
...
Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/bug.3A.20pasting.20cells.20from.20libreoffice.20calc.20is.20only.20image/near/2176558 .
Co-authored-by: Puneeth Chaganti <punchagan@muse-amuse.in >
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com >
2025-07-09 09:52:52 -07:00
Ritwik
9feba0f16f
emoji: Remap ':smile' emoji and update the settings UI.
...
This commit remaps the ':smile' emoji to 😄 and
introduces ':slight_smile' which maps to `🙂 `.
Fixes #32712
2025-04-07 17:34:52 -07:00
apoorvapendse
66ca78dbd3
compose_paste: Add test to verify pasting from Mac terminal.
...
For context, #33569 appears to have been fixed
unintentionally by #33691 .
This just adds a test to verify the expected
behavior when it comes to pasting from the
Mac terminal as described by the reproduction
steps in #33569 .
We might still end up with some edge case in
the future, that might not work as expected.
CZO: https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.93.82.20surprising.20line.20breaks.20when.20copy-pasting.20.2333569/near/2119422
Co-authored-by: Kislay Verma <kislayuv27@gmail.com >
2025-03-11 09:48:35 -07:00
apoorvapendse
ef863258c2
compose_paste: Remove title formatting more carefully.
...
We now start to consider text nodes
with valid content to determine
whether we should remove the styling.
Fixes : #31218 .
2025-03-10 17:01:13 -07:00
apoorvapendse
8b9ba36465
copy_and_paste: Split copy and paste.
...
Note that the puppeteer tests only tested
copying whereas the node tests only tested
pasting, which is why the puppeteer tests
for pasting and node tests for copying are
absent after this split.
2025-02-26 13:15:50 -08:00