josdejong / josdejong/svelte-jsoneditor

Issue with focus when created in a new window.

Open
#90 1 comment 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
TypeScript
Stars
1.3k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

If a new window is created using `window.open()` and then the json editor is created with `target` property set to `wind.document.body` where `wind` is the new window or any other element inside `wind`, the editor stops functioning as usual. There seems to be some issue with focusing on the right element. E.g. the text field for key is not focused when a new prop is created.

[Link to pen demonstrating this behavior](https://codepen.io/kharon4/pen/VwQdGqg?editors=1000)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the behavior with the linked CodePen: open a window with window.open(), create the JSON editor with target set to the new window's document.body or an element inside it, and create a new property. Trace the focus handling around the target property; done means the key text field receives focus as it does in the main window.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.