Closed Bug 2028222 Opened 15 days ago Closed 5 days ago

Pasting multi-line text after selecting multi-line text does not overwrite, but applies markup for link

Categories

(bugzilla.mozilla.org :: Bug Creation/Editing, defect, P2)

Production

Tracking

()

RESOLVED FIXED

People

(Reporter: arai, Assigned: kohei)

References

(Regression)

Details

(Keywords: bmo-triaged, regression)

Attachments

(1 file)

The following code should check if the data contains single line only with URL, no other lines or any other characters after that.

https://github.com/mozilla-bteam/bmo/blob/master/js/text-editor.js#L299

    if (data.match(/^https?:\/\//) && URL.canParse(data)) {

Steps to reproduce:

  1. copy multiple lines starts with URL (like the above code block markdown in raw source)
  2. paste it into bugzilla comment field
  3. select the pasted text
  4. paste again

Actual result:
the selected multiple lines are linkified, with the pasted multiple lines as the link target

Expected result:
The text is overwritten with the pasted text

Severity: -- → S3
Keywords: bmo-triaged
Priority: -- → P2
Assignee: nobody → kohei
Status: NEW → ASSIGNED

Authored by https://github.com/kyoshino
https://github.com/mozilla-bteam/bmo/commit/b709c60508af18419e2cd93c3c20dfef52080ac3
[master] Bug 2028222 - Pasting multi-line text after selecting multi-line text does not overwrite, but applies markup for link

Status: ASSIGNED → RESOLVED
Closed: 5 days ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: