Skip to content

custom.js: fix invalid CSS selector in VAT country sync - #4308

Merged
nijel merged 3 commits into
WeblateOrg:mainfrom
Sumit-Sabhaya:fix-custom-js-selector
Sep 21, 2026
Merged

nijel merged 3 commits into
WeblateOrg:mainfrom
Sumit-Sabhaya:fix-custom-js-selector

Conversation

@Sumit-Sabhaya

Copy link
Copy Markdown
Contributor

Fixes #4307

In weblate_web/static/custom.js, the VAT form selector contained a
U+00B7 MIDDLE DOT (·) instead of a descendant combinator (space):

`#id_country·option[value="${value}"]`

This made querySelector() return null, throwing
TypeError: Cannot set properties of null (setting 'selected') whenever the
VAT country field changed, so the country <select> was never synced.

Fix: replace the middle dot with a space.

@Sumit-Sabhaya Sumit-Sabhaya changed the title https://github.com/WeblateOrg/website/compare/main...Sumit-Sabhaya:website:fix-custom-js-selector custom.js: fix invalid CSS selector in VAT country sync Sep 20, 2026
@nijel

nijel commented Sep 21, 2026

Copy link
Copy Markdown
Member

@codex review

@nijel
nijel enabled auto-merge (rebase) September 21, 2026 11:38
@nijel nijel self-assigned this Sep 21, 2026
@nijel

nijel commented Sep 21, 2026

Copy link
Copy Markdown
Member

Scheduled for merge, thanks for your contribution!

@nijel
nijel disabled auto-merge September 21, 2026 11:38
@nijel
nijel enabled auto-merge (squash) September 21, 2026 11:38
@Sumit-Sabhaya

Copy link
Copy Markdown
Contributor Author

@nijel Waiting For Approval.

@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.81%. Comparing base (4424e0f) to head (9a11116).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4308      +/-   ##
==========================================
- Coverage   91.85%   91.81%   -0.05%     
==========================================
  Files          76       76              
  Lines       16692    16692              
  Branches     1404     1404              
==========================================
- Hits        15333    15325       -8     
- Misses        943      949       +6     
- Partials      416      418       +2     
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nijel
nijel merged commit 3322d39 into WeblateOrg:main Sep 21, 2026
19 checks passed
@Sumit-Sabhaya

Copy link
Copy Markdown
Contributor Author

@nijel Thanks For Quickly Merge Can i have delete this fork ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

custom.js: TypeError due to invalid CSS selector (U+00B7 middle dot) in VAT form

2 participants