Closed Bug 1482875 Opened Last year Closed 11 months ago

Add a test for pasting with middle-click in the console input

Categories

(DevTools :: Console, defect, P1)

Unspecified
Linux
defect

Tracking

(firefox-esr60 unaffected, firefox61 unaffected, firefox62 unaffected, firefox63 unaffected, firefox64 wontfix, firefox65 wontfix, firefox66 fixed)

RESOLVED FIXED
Firefox 66
Tracking Status
firefox-esr60 --- unaffected
firefox61 --- unaffected
firefox62 --- unaffected
firefox63 --- unaffected
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- fixed

People

(Reporter: robwu, Assigned: nchevobbe)

References

Details

(Keywords: regression, Whiteboard: [boogaloo-mvp])

Attachments

(3 files)

STR:
1. Open the console.
2. Switch to the console tab.
3. Select any text.
4. Click using your mouse wheel in the editable area.

Expected:
- The selected text should be pasted.

Actual:
- Nothing is pasted

This is a regression caused by bug 1470922.
mozregression result: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=6cdfa85af851cd124cd535dacd0ce8e4131aeec5&tochange=d01677a667bc35ccd45af746d035d3daa97571ba


Another bug is that selecting text does not put the selected text on the primary keyboard (just like bug 1200448).

When I revert devtools.webconsole.jsterm.codeMirror back to false, then these bugs disappear.
It does look like Bug 953389, since we use CodeMirror in the input now (like in the StyleEditor and Debugger).
See Also: → 953389
Are you taking this? (notes that soft freeze is next week)
Flags: needinfo?(nchevobbe)
(In reply to David Durst [:ddurst] (REO for 63) from comment #2)
> Are you taking this? (notes that soft freeze is next week)

The CodeMirror input is going to stay nightly-only for 63, so this won't ride the train to beta. I'll leave the ni? open to make sure it gets tracked before riding the train.
Flags: needinfo?(nchevobbe)
Whiteboard: [boogaloo-mvp]
Priority: -- → P2
(re-adding the leave-open NI, moved to bgrins)
Flags: needinfo?(bgrinstead)
(In reply to David Durst [:ddurst] (REO for 63) from comment #4)
> (re-adding the leave-open NI, moved to bgrins)

It seems this is being handled in Bug 953389. We can leave this bug open for tracking / verification. As this is nightly only I don't think it needs to be tracked on 63.
Depends on: 953389
Flags: needinfo?(bgrinstead)
Priority: P2 → P3
Whiteboard: [boogaloo-mvp] → [boogaloo-reserve]
Whiteboard: [boogaloo-reserve] → [boogaloo-mvp]
Priority: P3 → P2
Attached image console paste area

Works for me on Fedora 28, latest Firefox Nightly, with the new jsterm enabled (default config).

Only tiny issue is that it won't work if clicking outside the green area (in the attached screenshot), but I don't think that would be a real problem for too many users.

Since it looks like it's working now, let's repurpose this bug to add a test that cover this functionality.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Summary: Cannot use wheel/middle-click paste to paste my X primary selection to the console → Add a test for pasting with middle-click in the console input
Priority: P2 → P1
Instead of focusing the input when a paste event is fired
on the scroller (which does not work on Firefox), we
dispatch the `paste` event from the scroller to the textarea.

We take this as an opportunity to update the package.json (we
probably don't need babel here, and we can update to latest
webpack).

Have we also consider filing a bug on CodeMirror so it can be fixed upstream?

(In reply to Gabriel [:gl] (ΦωΦ) from comment #10)

Have we also consider filing a bug on CodeMirror so it can be fixed upstream?

Yes, https://github.com/codemirror/CodeMirror/pull/5751

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9915f978e03b
Monkeypatch CodeMirror to handle pasting with middle-click in DevTools; r=gl.
https://hg.mozilla.org/integration/autoland/rev/bf190444c579
Add test for middle-click pasting in console input; r=Honza.
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
Flags: in-testsuite+
Duplicate of this bug: 953389
You need to log in before you can comment on or make changes to this bug.