fregante / fregante/GhostText

Send the selection from the browser to the editor (events)

Open
#257 0 comments 0 reactions 0 assignees View on GitHub
discussion enhancement
Dominant language
JavaScript
Stars
3.6k
Forks
133
PR merge metrics
No merged PRs in 30d

Description

# Setup

Browser: Safari
Editor: Sublime Text

# Description

It seems that the browser doesn't send the updated selection back to the editor. I vaguely remember discussing this in the past but it's possible we didn't do it just to keep things simple (it's not easy to listen to the selection changes in every field type)

Edit: indeed the event isn't even supported outside Firefox on textareas https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/selectionchange_event but it might work when attached to the document https://stackoverflow.com/a/58294874

Contributor guide

Open the contributing guide

Research direction

The issue names no file or test entry point; start by tracing the browser-to-editor selection event handling and compare the documented textarea and document-level selectionchange behavior. Done means updated browser selections are sent back to the editor across the relevant field types and supported browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.