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
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
Unknown Object (File)
Mon, Nov 11, 7:55 AM
Unknown Object (File)
Oct 27 2024, 2:16 PM
Unknown Object (File)
Sep 27 2024, 8:22 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