Add an evaluation result message when using the `copy` helper
Categories
(DevTools :: Console, enhancement)
Tracking
(firefox92 fixed)
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: claubatista, Mentored)
Details
Attachments
(1 file)
Steps to reproduce
- Open the console
- Evaluate
copy(1 + 1)
Expected results
A message is added in the console telling the user that a message was added to the clipboard, for example:
The following string was copied to clipboard: "2"
Actual results
No messages are displayed and the user has no way to know if the evaluation was successful or not.
Assignee | ||
Comment 1•3 years ago
|
||
Hi! I was able to reproduce.
I'd like to work on this bug. :)
Reporter | ||
Comment 2•3 years ago
|
||
Thanks Claudia,
So you might want to take a look at https://searchfox.org/mozilla-central/rev/da25888c4495585c532640f0e5efad07b1037621/devtools/client/webconsole/actions/input.js#203-204 where we do put the string (that the server sent us) into the clipboard.
In the same function, you can see how we add message to the console here https://searchfox.org/mozilla-central/rev/da25888c4495585c532640f0e5efad07b1037621/devtools/client/webconsole/actions/input.js#262-272
(the message is localized so we can have translation in multiple languages; the string is defined in https://searchfox.org/mozilla-central/rev/da25888c4495585c532640f0e5efad07b1037621/devtools/client/locales/en-US/webconsole.properties#433-436)
Let me know if you have any question!
Assignee | ||
Comment 3•3 years ago
|
||
Comment 5•3 years ago
|
||
bugherder |
Description
•