Page MenuHomePhabricator

Triple-clicking Gerrit change subject selects unwanted space at the beginning
Open, Needs TriagePublic

Description

This is a really minor point, but it still bugs me: when you triple-click the subject line of a Gerrit change (in PolyGerrit – haven’t tried the old UI), copy it, and paste it somewhere else, the pasted text will start with a single space. This is inconvenient, for example, when adding the subject to the deployment calendar, or when pasting it into the scap sync-file message argument ([[gerrit:123456| argh no space here]]). Can we fix this?

JavaScript workaround:

var textNode = document.querySelector('#commitMessageEditor .gr-change-view').childNodes[0];
if ( textNode.nodeName === '#text' ) {
    textNode.textContent = textNode.textContent.trim();
}

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 1 2019, 4:41 PM
Paladox moved this task from Bugs & stuff to PolyGerrit on the Gerrit board.Apr 24 2019, 4:12 PM
awight added a subscriber: awight.Jun 18 2019, 1:10 PM

Update: since the Gerrit 3 upgrade (T254158), triple-clicking no longer seems to work at all. For some reason. (Not just in the commit message, but also elsewhere, e. g. in review comments.)