Triple clicking file path in a diff cancels text selection only on Firefox

Reproduction Instructions

  1. Open https://secure.phabricator.com/rARC7112ee3d596019f0807748e6a7ec709041cdf166
  2. Scroll down to actual file changes and triple click src/hardpoint/ArcanistHardpointList.php header.
  3. Expected: Selecting the whole path, actual: selection canceled only on Firefox

Phabricator/Arcanist Version
Whatever Phabricator uses. It should be the latest one.

Digging further


Line 943 blocks line selection only on Firefox, since only Firefox fires selectstart with the target set as the header when selecting the whole line. Both Chrome and WebKit sets the target as the text node and thus they can still select the line (as the function returns early at line 938). The Firefox behavior is not considered as “wrong”, and thus requesting a fix here.

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1644742#c13.