Note that there are some explanatory texts on larger screens.

plurals
  1. POFirefox bug with dropdown borders? Bottom border not rendering in some cases
    primarykey
    data
    text
    <p>I was made aware of this bug when working with dropdown menus () in angular using ng-options. In some cases, Firefox does not render the bottom border of a dropdown menu, almost like it shaves off a few pixels on the bottom. If there were many menus on the page, it almost seemed to form a pattern (ABABAB | A = correct, B = incorrect). It seemed to be finicky based on font-size and browser zoom level. </p> <p>I first thought it was an issue with angular, but it seemed to be more of a browser rendering/css issue. I have found similar bug reports, but they are dated: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=311770" rel="nofollow noreferrer">https://bugzilla.mozilla.org/show_bug.cgi?id=311770</a></p> <p>In the stuff I am working on, the font-size is 8pt and it happens on the default zoom level. I was able to reproduce it using angular's angular-phonecat, and in my case it happens with a font-size of 8pt and a zoom level of 1. (If you want to reference phonecat, the only change I made was in the css, I changed the stylesheet for select font-size to 8pt and added the below to create dropdowns).</p> <pre><code>&lt;!-- Generates multiple populated dropdowns easily --&gt; &lt;table&gt; &lt;tr ng-repeat="phone in phones"&gt; &lt;td&gt; &lt;select ng-model = "phones" ng-options="phone.id for phones in phones"&gt; &lt;/select&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>Below is the an example of an incorrect one and a correct one. <img src="https://i.stack.imgur.com/cPIw4.png" alt="Bugged view vs correct one"></p> <p>I also reproduced this issue without using ng-options, and its the same case, the following code produces the same issue if repeated multiple times:</p> <pre><code>&lt;select&gt; &lt;option value=""&gt;&lt;/option&gt; &lt;!-- mimics default value produced by ng-options --&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;option value=""&gt;A&lt;/option&gt; &lt;/select&gt; </code></pre> <p>After further investigation, I found I was able to fix it by inserting an option with a non-breaking space that forces the default empty value to be of an equal height to the others like the following code snippet I used to reproduce it in angular-phonecat (though this doesn't explain why some rendered fine and others didn't):</p> <pre><code>&lt;!-- Generates multiple populated dropdowns easily --&gt; &lt;table&gt; &lt;tr ng-repeat="phone in phones"&gt; &lt;td&gt; &lt;select ng-model = "phones" ng-options="phone.id for phones in phones"&gt; &lt;option value=""&gt;&amp;nbsp;&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>For easy access, here is a fiddle of it: <a href="http://jsfiddle.net/f3mzm/" rel="nofollow noreferrer">http://jsfiddle.net/f3mzm/</a> For me, on 1920x1080, the group of dropdown menus have no bottom-border, but re-sizing the browser window to certain sizes has them. <img src="https://i.stack.imgur.com/h1EXy.png" alt="Issue in JSfiddle"></p> <p>The kicker is this: I already mentioned that if I make the first option a non-breaking space it worked, but if I changed the font-size to something other than 8pt, it works fine as well. The latter is not an option with what I am working on and the former is unfavorable, but seems like its needed as a workaround. Is this indeed a browser issue like the other border issues that have been reported about the browser, or am I just going insane?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload