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

Is there any way to focus the panel content? #479

Closed
DanielGarciaGuillen opened this issue Jan 26, 2024 · 3 comments · Fixed by #482
Closed

Is there any way to focus the panel content? #479

DanielGarciaGuillen opened this issue Jan 26, 2024 · 3 comments · Fixed by #482
Labels
enhancement New feature or request
Milestone

Comments

@DanielGarciaGuillen
Copy link

DanielGarciaGuillen commented Jan 26, 2024

Hello!

First of all, thanks for the lib!

I am trying to focus on the content of a Panel (we are opening the panel from a sidebar).

When clicking on a sidebar item, the panel does not get focused.

I would appreciate it if you could provide some information about the focus provided by the API or another approach I should consider to be able to focus on the content of a panel when the panel is active.

Codesandbox

To check what element is active dynamically:

Open the Console.
Click the Create live expression button (it looks like an eye icon).
In the text box that appears, type document.activeElement.
Now click/tab around the page and see the live expression update to reflect which element is currently focused.

Thanks!

@mathuo mathuo linked a pull request Jan 27, 2024 that will close this issue
@DanielGarciaGuillen
Copy link
Author

@mathuo thanks for your work!
Just a note, I have being using the onDidActiveChange event. I found an issue, when having a couple of panels in a group, when moving one panel to another group, the event on the listener gives you the wrong active panel.

Here is a codesanbox, Panel 2 is active, if you move Panel 2 out of the group, the Panel 1 event listener says that the panel 1 is active for a bit before setting it to false.

@mathuo mathuo added this to the v1.10.0 milestone Feb 8, 2024
@mathuo mathuo added the enhancement New feature or request label Feb 8, 2024
@mathuo mathuo reopened this Feb 8, 2024
@mathuo
Copy link
Owner

mathuo commented Feb 27, 2024

v1.10.0 has a few substancial changes around how events are fired and how things are made "active" and focused.

Hopefully this demo is useful in understanding the events https://dockview.dev/demo/

Do let me know if things are still not covered as expected though.

@mathuo mathuo closed this as completed Feb 27, 2024
@DanielGarciaGuillen
Copy link
Author

@mathuo the updated fixed the issue regards moving the groups thanks!!!

But the focus method on panel (like mentioned on the first message here) still does not seems to be do what it says (focus the panel), is this intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants