Clean up the RB.TextCommentRowSelector

Review Request #10192 — Created Oct. 3, 2018 and submitted

Information

Review Board
release-4.0.x
0c8e103...

Reviewers

The RB.TextCommentRowSelector has been cleaned up, modernized, and
ported to ES6. All the method documentation is now aligned with our
documentation standards.

There were two cases of event handlers (for mousedown and mouseup)
which were sometimes returning False to prevent the default event
from ocurring. However, this behaviour is not actually supported; the
DOM events for mousedown and mouseup do not have preventDefault in
their prototypes and so the default behaviour cannot be prevented.

The _copySelectionToClipboard has been modernized to not do repeated
string concatentation. Instead it builds up an array of strings and
joins them with the detected platform's newline character.

In addition, a function that _copySelectionToClipboard was defining
has been pulled out into the prototype to make it clear that it does not
close over any variables in the method.

Ran JS tests.

Description From Last Updated

Col: 29 Missing semicolon.

reviewbotreviewbot

typo: sop -> stop

daviddavid

"Copies" -> "Copy"

daviddavid

Handles -> Handle

daviddavid

Handles -> Handle. Also the summary should be only one line.

daviddavid

Handles -> Handle

daviddavid
Checks run (1 failed, 1 succeeded)
flake8 passed.
JSHint failed.

JSHint

brennie
brennie
david
  1. 
      
  2. Show all issues

    typo: sop -> stop

  3. Show all issues

    "Copies" -> "Copy"

  4. Show all issues

    Handles -> Handle

  5. Show all issues

    Handles -> Handle. Also the summary should be only one line.

  6. Show all issues

    Handles -> Handle

  7. 
      
brennie
brennie
david
  1. Ship It!
  2. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.0.x (c16187d)