posit-dev / posit-dev/positron
Copy and paste breaks for Shiny apps in Viewer pane after app reload
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 195
Description
System details:
Positron and OS details:
Positron Version: 2025.06.0 (Universal) build 48
Code - OSS Version: 1.99.0
Commit: 621d1ce8f7fecc9623e9ab59b36c62f23d626d3d
Date: 2025-05-12T03:33:48.170Z
Electron: 34.3.2
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.4.0
Interpreter details:
Describe the issue:
In Shiny apps run via the Shiny extension and shown in the viewer pane, copy and paste actions work when the app is first loaded, but are lost when the app re-loads.
https://github.com/user-attachments/assets/64013dee-86a2-4b24-8ad0-e7fe56273f1c
Steps to reproduce the issue:
Using the example app from https://github.com/posit-dev/positron/issues/2993
library(shiny)
ui <- fluidPage(
textInput("name", "What's your name?"),
passwordInput("password", "What's your password?"),
textAreaInput("story", "Tell me about yourself", rows = 3)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
- Save the above app code to an
app.Rfile. - Use the Shiny extension to run the app in the viewer pane.
- Verify that copy and paste work when the app is loaded.
- Focus the app editor and save the app to trigger a reload.
- Copy and paste no longer work in the app.
Expected or desired behavior:
Copy/paste should continue to work after reload.
Note: if this is a Shiny extension problem, please let me know (and we'd appreciate advice on how to resolve).
Were there any error messages in the UI, Output panel, or Developer Tools console?
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided app.R example through the Shiny extension in the viewer pane, then compare clipboard behavior before and after saving the app to trigger a reload. Done means copy and paste continue to work after reload, with no new UI, Output panel, or Developer Tools errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100