Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't copy text on external webpages loaded in the Viewer pane #3640

Open
sharon-wang opened this issue Jun 25, 2024 · 5 comments
Open

Can't copy text on external webpages loaded in the Viewer pane #3640

sharon-wang opened this issue Jun 25, 2024 · 5 comments
Labels
area: viewer Issues related to Viewer category. bug Something isn't working

Comments

@sharon-wang
Copy link
Member

Positron Version: 2024.06.1-17

Positron Version: 2024.06.1 (Universal) build 17
Code - OSS Version: 1.90.0
Commit: 893521e
Date: 2024-06-25T03:49:55.034Z
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 23.4.0

Steps to reproduce the issue:

  1. Open an external URL in the Viewer, e.g. Command Prompt > Viewer: Open URL in Viewer > https://wesmckinney.com/book/python-basics
  2. Copy something to the clipboard from somewhere other than the Viewer Pane (just so we can use a previous clipboard value to differentiate between what we are trying to copy in the Viewer Pane)
  3. Select some text on the page in the Viewer, then right-click to Copy or Cmd/Ctrl+C
  4. Paste the text somewhere
  5. Notice that the text pasted is not the text from the Viewer Pane that was selected
editor_viewer_focus_rightclick_copycutpaste.mp4

This is similar to #2993, but for external URLs. Both Cmd/Ctrl+C and right-click context menu don't seem to work.

What did you expect to happen?

I expected to be able to copy content from the Viewer.

Were there any error messages in the output or Developer Tools console?

No

@sharon-wang sharon-wang added bug Something isn't working area: viewer Issues related to Viewer category. labels Jun 25, 2024
@sharon-wang
Copy link
Member Author

Just skimmed through the description of #3430 -- I don't think I should be hitting the "Simple Web Browser" code path since the URLs are being loaded in the Viewer Pane, but I'm not sure if external URLs are handled differently by the Viewer.

@sharon-wang sharon-wang changed the title Copying text on external webpages loaded in the Viewer pane Can't copy text on external webpages loaded in the Viewer pane Jun 25, 2024
@juliasilge
Copy link
Contributor

juliasilge commented Jul 1, 2024

This URL should probably open in an external browser as the Viewer isn't meant for real websites; maybe we can prompt a user to open an external URL in a browser instead of the Viewer.

@juliasilge juliasilge added this to the Release Candidate milestone Jul 1, 2024
@jmcphers
Copy link
Collaborator

jmcphers commented Jul 1, 2024

This is what I think we should show if you try to open an external URL in the Viewer pane -- same thing you see if trying to click on one in the Console. It goes through the trusted domain settings so there's a level of security built in.

image

@sharon-wang
Copy link
Member Author

Could there be room for a user opting-in to a limited browsing experience in the Viewer?

Maybe it's just the workflow I had when walking through the Python for Data Analysis lessons, but I really liked having the book open in the Viewer while I was tinkering around in IDE to run code in the console, view my session variables, see plots, look at help docs, use the data explorer, etc.. I didn't have to leave the IDE to look at a browser because everything I needed was in Positron!

@isabelizimm
Copy link
Contributor

fwiw, this may be a workflow that happens more in Python. I also have used the viewer as a browser for Python package documentation (when the Help pane docstrings were minimal) and really liked the experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: viewer Issues related to Viewer category. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants