Closed
Bug 1338094
Opened 7 years ago
Closed 7 years ago
[Mortar] Support hotkey for copy selected text in PDF viewer.
Categories
(Firefox :: PDF Viewer, defect)
Firefox
PDF Viewer
Tracking
()
RESOLVED
FIXED
Firefox 54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: rexboy, Assigned: rexboy)
References
Details
Attachments
(1 file)
This bug aims for supporting copy selected text to system clipboard (with the default system copy hotkey).
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → rexboy
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•7 years ago
|
||
Comment on attachment 8837530 [details] Bug 1338094 - [Mortar] Support keyboard copy. f=lchang, Tested on Mac and Linux. (Per feedback from Bruce, Linux may need additional care because it has several clipboards) Not on windows yet because I haven't build up my environment for Windows. Luke may you take a look first?
Attachment #8837530 -
Flags: feedback?(lchang)
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8837530 [details] Bug 1338094 - [Mortar] Support keyboard copy. f=lchang, https://reviewboard.mozilla.org/r/112674/#review114782 ::: browser/extensions/mortar/host/pdf/chrome/js/viewport.js:45 (Diff revision 1) > this.onPageChanged = null; > this.onPasswordRequest = null; > > this._viewportController.addEventListener('scroll', this); > window.addEventListener('resize', this); > + window.addEventListener('copy', this); Listening to `copy` event globally makes users unable to copy text from other inputs, say, "pageNumber" and "password". Registering it on `_viewportController` probably can fix that, but I haven't tried it.
Updated•7 years ago
|
Attachment #8837530 -
Flags: feedback?(lchang)
Assignee | ||
Comment 4•7 years ago
|
||
Thanks for pointing that out. I'll make a test with those case before sending another revision.
Assignee | ||
Comment 5•7 years ago
|
||
The reaction for copying inside pdf form: PDFium: No reaction. PDF.js: No form support. Mortar: ignore function key and treat as key-in.(e.g. pressing command-c replaces character C to selection) Maybe we can discuss whether to process the Mortar's behavior in this bug or not.
Comment 6•7 years ago
|
||
(In reply to KM Lee [:rexboy] from comment #5) > The reaction for copying inside pdf form: > > PDFium: No reaction. > PDF.js: No form support. > Mortar: ignore function key and treat as key-in.(e.g. pressing command-c > replaces character C to selection) > > Maybe we can discuss whether to process the Mortar's behavior in this bug or > not. Let's file another bug for dealing with cmd-c accidentally appearing on form input field when typing without IME invoked.
Assignee | ||
Comment 7•7 years ago
|
||
The issue in comment 5 will be handled in bug 1338095.
See Also: → 1338095
Comment hidden (mozreview-request) |
Assignee | ||
Comment 9•7 years ago
|
||
Comment on attachment 8837530 [details] Bug 1338094 - [Mortar] Support keyboard copy. f=lchang, Tested and confirmed that it's copyable from page number. password shouldn't be copied anyway (and it can't in this revision) so this case is excluded. Since we're going to handle it in I didn't add stopImmediatePropagation for now. Please take a look again. Thanks!
Attachment #8837530 -
Flags: feedback?(lchang)
Assignee | ||
Comment 10•7 years ago
|
||
* Since we're going to handle the issue in comment 5 in runtime layer sorry for the typo.
Comment 11•7 years ago
|
||
(In reply to KM Lee [:rexboy] from comment #7) > The issue in comment 5 will be handled in bug 1338095. isn't it bug 1340995?
Flags: needinfo?(rexboy)
Assignee | ||
Updated•7 years ago
|
Comment 12•7 years ago
|
||
Comment on attachment 8837530 [details] Bug 1338094 - [Mortar] Support keyboard copy. f=lchang, Looks good now. Thanks a lot.
Attachment #8837530 -
Flags: feedback?(lchang) → feedback+
Comment 13•7 years ago
|
||
mozreview-review |
Comment on attachment 8837530 [details] Bug 1338094 - [Mortar] Support keyboard copy. f=lchang, https://reviewboard.mozilla.org/r/112674/#review115526 Thanks.
Attachment #8837530 -
Flags: review?(ehung) → review+
Comment 14•7 years ago
|
||
Pushed by ehung@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f39a5e845a1d [Mortar] Support keyboard copy. f=lchang, r=evelyn
Comment 15•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f39a5e845a1d
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
You need to log in
before you can comment on or make changes to this bug.
Description
•