Input elements bleed over into surrounding elements on pages
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: drankinatty, Assigned: emilio)
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
Visiting virtually any page with form input dialog, the input dialog is twice the normal size causing it to bleed over into other elements on the page. I am using the default Gtk+3 Adwaita theme.
Take for example the National Weather Service Southern Plains RADAR page: https://radar.weather.gov/Conus/southplains.php
Actual results:
If you look at the input for "City, St" and the associated "Go" button, the input is twice the size of the "Go" button (both were the same size in all Gtk+2 versions of FF) and both bleed over into the element below.
Expected results:
The input height should be the same size as the "Go" button and both should fit in the blue element above the RADAR image. I have used this page for many years, and these always fit perfectly until ? FF 52? 60? -- whatever version coincided with the Gtk+2/3 change. I am using the default Gtk+3 theme Adwaita. After a year plus, this issue should be fixed. It doesn't just effect the NWS site, that is just an example that I went to today that triggered the filing of this bug. It happens to virtually ever input (and tooltip generated from the title= property). They are oversized. This appears to be the result of improper border, padding and margin property defaults with the CSS model that the newer Firefox builds rely on.
I have used Firefox since it was introduced and there were never problems with element rendering to the extent there are now. There need to be proper defaults, especially in the default Adwaita and/or Firefox CSS model so that normal HTML elements are sized properly and do not bleed over into surrounding elements.
The attached screenshot for the URL shows the problem.
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
•
|
||
Thanks for the report.
I believe the extra height of the <input>
comes from gtk theme. I see the same result on Firefox 76 installed from my linux distribution (Linux mint 19.3). But if I go to url bar -> type "about:config" -> search for widget.content.gtk-theme-override
, and change the value from #
to empty. The extra height is gone. (Attached a screenshot for reference.)
The stock Firefox downloaded from https://www.mozilla.org/en-US/firefox/new/ doesn't have this issue, fwiw.
Comment 3•5 years ago
|
||
Emilio, do you know what is the correct approach to fix layout different on widget themed form controls? Do we have plan to enable widget.disable-native-theme-for-content
globally?
Assignee | ||
Comment 4•5 years ago
|
||
You're right this is a GTK bug... Non-native theme is not going to happen very soon I fear. But I think we can fix this without too much trouble. I have a patch that seems to behave nicely here.
Assignee | ||
Comment 5•5 years ago
|
||
This makes inputs not remain very big at small font sizes, while keeping
the right native appearance at normal / large font sizes, which is
needed for compat both with other themes and other browsers.
Updated•5 years ago
|
Comment 6•5 years ago
|
||
It's actually the button that is less consistent with native rendering here, which can be seen by adjusting GTK's default font size at gtk3-widget-factory -> Menu -> Inspector -> Visual -> Font.
However, I think there may be a case to argue that the web has a greater variety of sizes than typical GTK apps and so we should ignore some of the minimum sizes.
Comment 7•5 years ago
•
|
||
data:text/html,<input%20type=text%20value="entry"><button>button
At typical system font sizes, this is tighter than the native box.
Comment 8•5 years ago
|
||
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/68778a6a157b
https://hg.mozilla.org/mozilla-central/rev/b9b9ee1004f3
https://hg.mozilla.org/mozilla-central/rev/e71fbfcb8d96
Description
•