Copy/ Paste after Select All is broken
Categories
(Firefox for Android Graveyard :: Text Selection, defect, P1)
Tracking
(firefox66 unaffected, firefox67 unaffected, firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox66 | --- | unaffected |
firefox67 | --- | unaffected |
firefox68 | --- | fixed |
People
(Reporter: csheany, Assigned: m_kato)
References
(Regression)
Details
(Keywords: regression, Whiteboard: [triagemonth-2019-03] [bcs:p2])
Attachments
(4 files)
User Agent: Mozilla/5.0 (Android 7.1.1; Tablet; rv:68.0) Gecko/68.0 Firefox/68.0
Steps to reproduce:
- Open this bug
- View Page Source
- Select all
- Attach File
Actual results:
Text is not pasted
Expected results:
Text is pasted
Comment 2•5 years ago
•
|
||
Hi :csheany,
Would you please elaborate the 4th step. What do you mean by 'Attach File'?
In my "Firefox Nightly for Android", I tried the following step:-
-
Open Firefox Nightly for Android 68.0a1
-
Visit this bug link
-
View Page Source
-
Select all the 'Page Source' elements and copy
-
And then I tried paste the elements in somewhere else
Actual Result : The elements of 'Page Source' are actually not copied successfully
Is this the problem you are trying to say?
Please, let us know so that we can move ahead!
Thank you for your response.
Yes, that is the problem.
Assignee | ||
Updated•5 years ago
|
Comment 5•5 years ago
•
|
||
Thanks for the report!
Tested on the latest Nightly build and I was able to reproduce the issue following the steps from description and comment 2.
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
nsHTMLCopyEncoder::GetPromotedPoint throws error, so copy is failed. I will investigate this why this failure is only mobile.
Updated•5 years ago
|
Assignee | ||
Comment 7•5 years ago
|
||
Before landing bug 676268, we don't copy HTML source, but after landing it, we try to copy HTML source.
And Fennec's action bar has a mistake to use selection all. Firefox/Desktop uses cmd_selectAll, but Fennec doesn't use it (cmd_selectAll isn't same as nsISelectionController.selectAll).
Assignee | ||
Comment 8•5 years ago
|
||
After bug 676268 is landed, Gecko/Android supports text/html
mime type on
clipboard. But copy command is sometimes failed after select all is executed.
nsISelectionContoller.selectAll
is different of cmd_selectAll
.
Since cmd_selectAll
that is used on Firefox desktop doesn't select root
element, copy command always works well. So we should use it like desktop
browser on Fennec.
Also, GV already uses cmd_selectAll on action bar, so this is Fennec only.
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/6abaf5f96b42 Use cmd_selectAll instead of nsISelectionController.selectAll on action bar r=geckoview-reviewers,esawin
Comment 10•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Updated•5 years ago
|
Comment 11•5 years ago
|
||
Hello!
I tested this following the steps from Comment 2, on the latest version of Nightly 68.0a1 (2019-04-10) with Samsung Galaxy Note 8 (Android 9), Nokia 6 (Android 7.1.1) and I can reproduce this issue. Moreover the browser is closing when tapping on the "Copy" option.
Video: https://drive.google.com/file/d/1NW9KxSk7ykIw0RsN8KGLisr1vzPhiVLG/view
Note:
- On Nexus 6P (Android 8.1.0) the browser is not closing when tapping on the "Copy" option, but the issue is still reproducible.
Reporter | ||
Comment 12•5 years ago
|
||
Do you have any idea why this might be failing?
Assignee | ||
Comment 13•5 years ago
|
||
(In reply to csheany from comment #12)
Do you have any idea why this might be failing?
When I test this, it work well. I guess that content is bigger than I test this issue, then TransactionTooLargeException is thrown. Although This is another issue, it is OK to investigate this on this issue.
Assignee | ||
Comment 14•5 years ago
|
||
Even if I don't land bug 676268, I think that this will occurs with too large text.
Reporter | ||
Comment 15•5 years ago
|
||
It seemed to be working initially.
Have there been additional patches that could have had an impact?
Assignee | ||
Comment 16•5 years ago
|
||
(In reply to csheany from comment #15)
It seemed to be working initially.
Have there been additional patches that could have had an impact?
Yeah, I am working additional fix.
Assignee | ||
Comment 17•5 years ago
|
||
Assignee | ||
Comment 18•5 years ago
|
||
When setting large clipboard data, it may cause TransactionTooLargeException
in binder IPC. So we have to handle RuntimeException
.
Updated•5 years ago
|
Comment 19•5 years ago
|
||
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/53793d2ea3ec Handle RuntimeException when setting clipboard data r=geckoview-reviewers,snorp
Comment 20•5 years ago
|
||
bugherder |
Reporter | ||
Comment 21•5 years ago
|
||
I'm getting a "Can't copy. Text too long" message.
I imagine that is a side effect of the patch but isn't ideal.
When first landed the functionality was in place.
Can someone help track down the "regression"?
I am still investigating on my end.
Comment 22•5 years ago
|
||
(In reply to csheany from comment #21)
I'm getting a "Can't copy. Text too long" message.
What is the exact wording of the error message? Does it look like an Android system message or a Fennec message?
Makoto's patch catches an Android RuntimeException and returns false. Perhaps the patch should pretend the copy succeeds and always return true? Perhaps returning false is triggering an error message in Gecko or Android.
Reporter | ||
Comment 23•5 years ago
|
||
Reporter | ||
Comment 24•5 years ago
|
||
If copying doesn't succeed the user should know.
I'm trying to figure out what made it seeem like the first patch never existed.
I'm surprised it broke again in less than a week.
Maybe "Text Copied To Clipboard" shouldn't be displayed?
Assignee | ||
Comment 25•5 years ago
|
||
(In reply to csheany from comment #21)
I'm getting a "Can't copy. Text too long" message.
When copying HTML, we try to copy HTML format. If failed, we copy as plain text. So this message may be outputted to logcat when HTML copy is failed. But since we try to text after it, so text is stored to clipboard.
This is Android OS's clipboard limitation that is around 1MB due to binder transaction.
So before landing bug 676268, coping large text will be failed and Fennec may crash due to unhandled exception. After landing this, Fennec doesn't crash at this situation.
Comment 26•5 years ago
|
||
Tested on the latest Nightly build and the issue is not fixed. The browser is not closing but Paste & Go doesn't work.
The issue is not reproducible when we use just "paste".
Video: https://drive.google.com/file/d/1e0yEcwQRmRTSIrlOWa2zTVOW_fsp9Tuj/view?usp=sharing.
Reporter | ||
Comment 27•5 years ago
|
||
Makoto, thank you for the explanation.
Updated•5 years ago
|
Reporter | ||
Comment 28•5 years ago
|
||
Not again! :)
I am unable to play the video.
What are you exlecting to Paste & Go?
Comment 29•5 years ago
|
||
(In reply to csheany from comment #28)
Not again! :)
I am unable to play the video.
What are you exlecting to Paste & Go?
The video is available for everyone with the link. For Paste & Go, I used a recommended by Pocket article.
Reporter | ||
Comment 30•5 years ago
|
||
I had to download it but...
Would that be more of an issue with Paste & Go?
This was about it not being copied to the clipboard in the first place.
Assignee | ||
Comment 31•5 years ago
|
||
(In reply to Sorina Florean [:sflorean] from comment #26)
Tested on the latest Nightly build and the issue is not fixed. The browser is not closing but Paste & Go doesn't work.
The issue is not reproducible when we use just "paste".Video: https://drive.google.com/file/d/1e0yEcwQRmRTSIrlOWa2zTVOW_fsp9Tuj/view?usp=sharing.
Could you file new bug instead of reopen this? This seems to be Paste and Go implementation issue of address bar.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 32•5 years ago
|
||
(Although I add to support text/html, address bar seems to allow formatted text. address bar shouldn't allow it then it only supports plain text that is included in text/html clipdata. So this is address bar issue.
Comment 33•5 years ago
|
||
Filed bug 1546890 for Paste&Go option. I will close this and mark as verified since Paste option is working.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•3 years ago
|
Description
•