Opened 5 years ago

Last modified 5 years ago

#3542 assigned defect

Copy and paste Log html does not work on Windows

Reported by: goddard@… Owned by: Greg Couch
Priority: normal Milestone:
Component: Logging Version:
Keywords: Cc: pett
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Windows-10-10.0.18362
ChimeraX Version: 1.1.dev202007061851 (2020-07-06 18:51:18 UTC)
Description
Copy and paste of log on Windows does not work when pasting into an app that accepts HTML, nothing gets pasted.  Tested with sonic web mail page in Firefox.  It does work when pasting into a plain text field (e.g. the subject line of a mail message in Firefox).

Would be very useful if html paste worked.


Log:
UCSF ChimeraX version: 1.1.dev202007061851 (2020-07-06)  
© 2016-2020 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> usage leap

leapmotion [enable] [pointerSize a number] [modeLeft modeLeft] [modeRight
modeRight] [width a number] [center center] [facing facing] [cord cord]
[pinchThresholds pinchThresholds] [maxDelay a number] [headMounted true or
false] [debug true or false]  
— Enable leap motion hand tracker for mouse modes.  
enable: true or false  
modeLeft: one of mouse or vr  
modeRight: one of mouse or vr  
center: some numbers  
facing: some numbers  
cord: some numbers  
pinchThresholds: some numbers  




OpenGL version: 3.3.0 NVIDIA 398.35
OpenGL renderer: GeForce GTX 1070 with Max-Q Design/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation
Manufacturer: Micro-Star International Co., Ltd.
Model: GS65 Stealth Thin 8RF
OS: Microsoft Windows 10 Pro (Build 18362)
Memory: 34,195,668,992
MaxProcessMemory: 137,438,953,344
CPU: 12 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz"
PyQt version: 5.12.3
Compiled Qt version: 5.12.4
Runtime Qt version: 5.12.9

Change History (9)

comment:1 by Tom Goddard, 5 years ago

Component: UnassignedLogging
Owner: set to Greg Couch
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionCopy and paste Log html does not work on Windows

comment:2 by Greg Couch, 5 years ago

Out of curiosity, does it work on the Mac?

comment:3 by pett, 5 years ago

Cc: pett added

I think the difficulty here is that the commands in the log use very complicated HTML to handle the execution-vs-help dual use, and when pasted into most external HTML areas it simply doesn't echo at all. To get around that, the HtmlView class was recently changed to put the plain text onto the app clipboard (instead of using the web page's Copy() method). It is possible to also set the MIME data of the clipboard, but I don't know what you would set it to that would work.

comment:4 by Tom Goddard, 5 years ago

The copy and paste works on Mac using ChimeraX daily July 23 2020 into the same Firefox sonic web mail app.

This same daily build using ctrl+C and ctrl+V on Windows just pastes a blank gray line in the Firefox sonic web mail app. If I paste into a plain text editor emacs it works on Windows, except that newlines are missing so all lines are smashed into one (probably a newline ending problem). If I copy the same text from the emacs editor then paste into Firefox sonic mail it works. So it looks like ctrl+c copy on Windows provides both html and plain text (or maybe just html) and the html does not work because of our non-standard additions.

As Eric says. It seems copy has uninterpretable html caused by our doc and execution command links.

comment:5 by Greg Couch, 5 years ago

The ctrl+C support is entirely within QWebEngine. ChimeraX's "Copy Selection" in the log only gets the text. I tried Qt 5.15.0 and it did not fix the problem. So the solution will be to generate a test case and submit a bug to Qt.

in reply to:  6 ; comment:6 by goddard@…, 5 years ago

The problem does not appear to be Qt.  Ctrl+C does appear to get the Log html on Windows.  The problem is the html is unusable by Mail apps and web forms that can't understand stuff in our html for switching between execution and doc command links.  If we want to have copyable html then we have to use html that does not trip up apps expecting standard html.  I think we do want copyable html.  I have hit this problem a dozen times, it is really poor when copy and paste does not function.

comment:7 by Greg Couch, 5 years ago

If I try to ctrl+C a HTML table from the log, i.e., without the command link, it doesn't correctly paste either. Does that work on the Mac?

in reply to:  8 ; comment:8 by goddard@…, 5 years ago

A table pastes as plain text on Mac in the Mail app.  That might be because of the fix Eric did about putting play text on the clip-board.

2bfu mmCIF Assemblies
1	complete icosahedral assembly
2	icosahedral asymmetric unit
3	icosahedral pentamer
4	icosahedral 23 hexamer
5	icosahedral asymmetric unit, std point frame
6	crystal asymmetric unit, crystal frame

comment:9 by Greg Couch, 5 years ago

On windows, when I try to copy & paste the HTML table into a Thunderbird mail composition dialog, I get a big vertical rectangle with Qt 5.15 and nothing with Qt 5.12. But if I switch to an HTML view of my email, I get the plain text with both versions of Qt. When I use Eric's addition that uses qwebengine.selectionText() when "Copy Selection" is chosen, then I get no text in the regular view, and the plain text in the HTML view. Very odd.

Note: See TracTickets for help on using tickets.