# Plot pane and focus in vscode

**URL:** https://discourse.julialang.org/t/plot-pane-and-focus-in-vscode/127214
**Category:** Performance
**Tags:** languageserver
**Created:** [March 21, 2025, 10:05am UTC](https://discourse.julialang.org/t/plot-pane-and-focus-in-vscode/127214 "2025-03-21T10:05:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Gravlax](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@Gravlax](https://discourse.julialang.org/u/Gravlax)
#### Post date: [March 21, 2025, 10:05am UTC](https://discourse.julialang.org/t/plot-pane-and-focus-in-vscode/127214/1 "2025-03-21T10:05:42Z")

</div>

Hi,

I have a problem when working in vscode. Figure produced within the vscode window are not easily “copy-able” (`Julia: Copy Plot`). It yields the error message: `Failed to copy plot: Plot pane does not have focus`  
I need to click an unpredictable amount of times on the figure and at some point it might become “copy-able”.  
As a result I end up making screenshots of most figures I make when working with Julia in vscode, which is a pity. I guess I’m not the only one 😃

Does any one know an easy fix?

Cheers

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [March 21, 2025, 4:21pm UTC](https://discourse.julialang.org/t/plot-pane-and-focus-in-vscode/127214/2 "2025-03-21T16:21:11Z")

</div>

This PR of mine just got merged recently, but isn’t released yet [Allow saving for Makie png/html plots and improve clipboard behavior by jkrumbiegel · Pull Request #3780 · julia-vscode/julia-vscode · GitHub](https://github.com/julia-vscode/julia-vscode/pull/3780)

For me it seemed to mostly fix that issue, which had also annoyed me a lot. But it’s not a deterministic fix so I’ll wait and see how it performs in the wild. As far as I understood, the clipboard API needs to be triggered via a user-focused element so that the clipboard can only be written due to a user interaction. But apparently this focus detection is prone to race conditions, hopefully my PR helps by delaying the check a little bit after the button click.
