11ty / 11ty/dev-server

11ty dev server can "trap" you on the current page

Open Beginner friendly
#147 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
109
Forks
20
Avg merge
1m
Merged PRs (30d)
1

Description

https://github.com/user-attachments/assets/1a2972bc-e978-4fd4-9480-118bb8cac514

Firefox 153
Mac M3
Tahoe 26.5.1
11ty 3.1.6

Looks like specifically its the "focus" event listener seems to be the problem:

https://github.com/11ty/dev-server/blob/1c658605f75224fdc76f68aebe7a412eeb4f1bc9/client/reload-client.js#L325-L326

from what i can tell event ordering is:

focus -> beforeunload -> unload

so because focus fires before the unload events, it blocks navigation to external places. Haven't tested the new alpha releases if its the same.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in client/reload-client.js at the focus event listener around lines 325-326, and reproduce the issue by navigating away from an 11ty dev-server page in the reported Firefox environment. Compare the focus, beforeunload, and unload ordering; done means navigation to external pages is no longer blocked by the dev server client.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.