luakit / luakit/luakit

Disabling Javascript breaks some browser functionality

Open
#1,116 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
2.3k
Forks
254
PR merge metrics
No merged PRs in 30d

Description

**Current Behavior:**
Disabling Javascript breaks the Luakit settings page and some other functionality (e.g. bookmarks adding).

**Desired Behavior:**
Disabling Javascript should not affect browser UI functionality itself.

**How can we reproduce it (step by step):**
1. Disable Javascript (`:settings`, uncheck `webview.enable_javascript` checkbox).
2. Restart Luakit browser.
3. Go to some web page and try to add a bookmark (`B`).
Bookmarks page with filled popup dialog appears, but on Save, empty page appears (possibly with already existing bookmarks gone), and the bookmark is not saved.
(Neither `:bookmark URL` works, as it triggers the same UI.)
4. Try to enable Javascript again (the checkbox label does not change to green "Enabled", which might not be noticed at this time). After browser restart, Javascript is still disabled. User realizes that the settings UI is practically defunct.
(`:set webview.enable_javascript true` +restart works.)

**Environment:**

Linux Distribution & Version: Arch linux
```
luakit 2.4.0
built with: webkit 2.46.6 (installed version: 2.48.3)
GTK 3.24.49
GLIB 2.84.0
SOUP 3.6.4
```

Contributor guide

Open the contributing guide

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

Reproduce the issue through :settings by disabling webview.enable_javascript, restarting, then trying B and :bookmark on a web page. Trace the settings checkbox and bookmark popup flows, including Save, and verify that browser UI actions still work and the setting can be re-enabled after the fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, lua
Domain
desktop, 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.