Closed EdsterG closed 3 months ago
If the devs have some thoughts on where to start looking to debug this issue, I'm happy to do the work and push a fix.
Can you reproduce it reliably? Can you try without IJulia?
Can you reproduce it reliably?
Yes.
Can you try without IJulia?
This works in my browser without IJulia.
using WGLMakie, Bonito
App() do session::Session
scatter(1:4, color=1:4)
end
This displays nothing in a local IJulia:
using WGLMakie, Bonito
App() do session::Session
scatter(1:4, color=1:4)
end
This also displays nothing in a local IJulia:
using WGLMakie, Bonito
Page()
App() do session::Session
scatter(1:4, color=1:4)
end
This finally displays the figure in a local IJulia (but the control key still isn't captured):
using WGLMakie, Bonito
Page(listen_url="localhost")
App() do session::Session
scatter(1:4, color=1:4)
end
After some digging around it seems like some keyboard keys are captured correctly left_alt
works, but left_super
and left_control
don't work.
Ok, based on https://github.com/jupyterlab/jupyterlab/issues/16619#issuecomment-2258741457 it seems like there's a missing attribute. I've tried using my browsers element inspector to manually add this attribute. Adding it to the bonito-fragment
div elements doesn't work, but adding data-lm-suppress-shortcuts="true"
directly to the canvas works! As I'm not a frontend dev, I wasn't able to figure out what generates the canvas element and it's attributes, but it seems like an easy fix. @SimonDanisch if you can point me in the right direction I'd be happy to push a PR.
Cool, you can add it here:
https://github.com/MakieOrg/Makie.jl/blob/4c4eaa1f3a7f7b3777a4b8ab38388a48c0eee6ce/WGLMakie/src/three_plot.jl#L36
Bonito/Hyperscript allows you to pass data-lm-suppress-shortcuts
as dataLmSuppressShortcuts
as a keyword argument!
Tested the fix, I can now use all of the letters along with the shift keys (previously not working). However, control
and command
/super
are still not captured. Might be an upstream issue, will follow up.
Opened an issue for lack of control
/super
capture, https://github.com/jupyterlab/lumino/issues/713.
Looks like WGLMakie had a bug regarding the super
key, I pushed a fix to https://github.com/MakieOrg/Makie.jl/pull/4068. This also solves capture of super
in JupyterLab.
Suppressing the context menu in #4068 solves the capture of control
.
]activate --temp; add Makie
) YesWhen plotting the basic example, mouse interactivity works but keyboard input isn't captured.
I can zoom and pan the plot, but I can't reset with
ctrl + leftclick
. If I change the default modifier forRectangleZoom
toleft_super
I lose zoom functionality, pressing left super seems to do nothing.This could be related to the error I get right below the plot, but I'm not completely sure: