Page MenuHomePhabricator

[web] Prevent hidden spoiler content from being revealed by text/cursor highlighting
ClosedPublic

Authored by rohan on Nov 10 2022, 9:58 PM.
Tags
None
Referenced Files
F3393030: D5617.id18488.diff
Sat, Nov 30, 11:07 AM
F3392981: D5617.id18396.diff
Sat, Nov 30, 10:56 AM
F3392710: D5617.diff
Sat, Nov 30, 9:59 AM
Unknown Object (File)
Mon, Nov 25, 3:52 AM
Unknown Object (File)
Wed, Nov 20, 5:05 PM
Unknown Object (File)
Wed, Nov 20, 5:05 PM
Unknown Object (File)
Wed, Nov 20, 5:05 PM
Unknown Object (File)
Wed, Nov 20, 5:04 PM

Details

Summary

On web, when a user highlights text with their cursor, we want to prevent 1) the text from being displayed to reveal the spoiler and 2) being copied prior to being revealed.

Linear: https://linear.app/comm/issue/ENG-2227/prevent-hidden-spoiler-content-from-being-revealed-by-textcursor

References:
https://caniuse.com/user-select-none
https://stackoverflow.com/questions/826782/how-to-disable-text-selection-highlighting

Depends on D5601

Test Plan

Tested visually to make sure that the text doesn't reveal on highlight and also made sure the unrevealed spoiler content does not get copied.

Before:

After:

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rohan edited the test plan for this revision. (Show Details)

nice thanks for considering all the different platforms/compatibility with them.

rohan edited the summary of this revision. (Show Details)

Rebase

Appreciate the attention to detail in catching this + thanks for the attached demo videos!

web/markdown/markdown.css
84–87 ↗(On Diff #18396)

I think we can probably drop the comments here since the prefixes are pretty ubiquitous, but feel free to keep if you prefer.

This revision is now accepted and ready to land.Nov 14 2022, 5:15 PM