Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Tor Browser
Commits
60deb682
Verified
Commit
60deb682
authored
Oct 20, 2022
by
henry
Committed by
ma1
Jul 26, 2023
Browse files
Options
Downloads
Patches
Plain Diff
Bug 41371: Temporary hack to fix language selector popup position
parent
31d7df07
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!712
Bug 41908: Rebased on 102.14
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
browser/components/preferences/main.js
+17
-0
17 additions, 0 deletions
browser/components/preferences/main.js
with
17 additions
and
0 deletions
browser/components/preferences/main.js
+
17
−
0
View file @
60deb682
...
...
@@ -1010,6 +1010,23 @@ var gMainPane = {
gMainPane
.
onPrimaryBrowserLanguageMenuChange
(
event
);
});
// Temporary hack to cause the menu popup to resize itself just after being
// shown. See tor-browser#41371
// We get ~one frame of a potentially badly sized popup, and then the popup
// should re-adjust to the new size.
// TODO: Remove with firefox 115 since this is fixed properly in
// mozilla-central 107.
menulist
.
addEventListener
(
"
popupshown
"
,
()
=>
{
const
popupBox
=
menulist
.
menupopup
;
// We change a layout parameter and then force a relayout. We choose
// "min-height: 0" since we expect this won't change the displayed result
// but is enough to force the relayout.
const
minHeight
=
popupBox
.
style
.
minHeight
;
popupBox
.
style
.
minHeight
=
0
;
popupBox
.
getBoundingClientRect
();
popupBox
.
style
.
minHeight
=
minHeight
;
});
gMainPane
.
updatePrimaryBrowserLanguageUI
(
Services
.
locale
.
appLocaleAsBCP47
);
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment