Bug 239033 - Select Option not respecting font; Always times new roman
Summary: Select Option not respecting font; Always times new roman
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari 15
Hardware: Mac (Apple Silicon) macOS 12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-09 10:23 PDT by Jay C
Modified: 2022-04-21 07:23 PDT (History)
4 users (show)

See Also:


Attachments
Movie of bug (14.30 MB, video/quicktime)
2022-04-09 10:23 PDT, Jay C
no flags Details
Test file (1.20 KB, text/html)
2022-04-20 18:37 PDT, Myles C. Maxfield
no flags Details
Screenshot (12.11 KB, image/png)
2022-04-20 18:37 PDT, Myles C. Maxfield
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jay C 2022-04-09 10:23:41 PDT
Created attachment 457170 [details]
Movie of bug

I have a select tag in a not-so-unique situation:

1. container div styles the "select"
2. select is actually opacity: 0
3. select options are showing Times New Roman for the font, even though it's all explicitly set

I've attached a video of Safari 15 on the left, and Firefox on the right. The option should at least be SOME sans-serif. No matter what I try it is not happening.

```
// HTML
<div class="RecentPostsStyles_recentPost__select__hnmLS"><select><option value="">All Types</option><option value="blog">Blog</option></select><span>All types</span><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="transform: rotate(0.25turn);"><path d="M10 17L15 12L10 7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></div>

// Sass
.recentPost__select {
  align-items: center;
  background-color: var(--theme-surface);
  border: thin solid var(--color-black);
  border-radius: var(--border-radius);
  display: flex;
  justify-content: space-between;
  overflow: hidden;
  padding: 0 1.6rem;
  position: relative;

  span {
    font: var(--type-body-xs);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    pointer-events: none;
  }

  select {
    appearance: none;
    background-color: transparent;
    border: none;
    flex: 1;
    font: var(--type-body-xs);
    left: 0;
    padding: 1.6rem;
    position: absolute;
    opacity: 0;
    top: 0;
    width: 100%;
    option: {
      font: var(--type-body-xs);
    }
  }
}
```
Comment 1 Alexey Proskuryakov 2022-04-12 14:58:09 PDT

*** This bug has been marked as a duplicate of bug 9600 ***
Comment 2 Jay C 2022-04-12 15:00:30 PDT
This is not a duplicate of #9600, this is a specific Safari bug displaying Times New Roman when it clearly shouldn't in the test case.
Comment 3 Radar WebKit Bug Importer 2022-04-16 10:24:15 PDT
<rdar://problem/91851445>
Comment 4 Myles C. Maxfield 2022-04-20 18:36:59 PDT
I copied the code above into a file and opened it, and didn't see the bug reproduce (file and screenshot attached).

Do you think you could do any of:
1. Provide a link to a website which has this bug that we can access
2. Save a page that demonstrates the problem as a webarchive (File -> Save as -> Format: Web Archive)
2. Provide content which demonstrates the problem
3. Provide a link to a jsfiddle or something like that that demonstrates the problem
Comment 5 Myles C. Maxfield 2022-04-20 18:37:22 PDT
Created attachment 458030 [details]
Test file
Comment 6 Myles C. Maxfield 2022-04-20 18:37:45 PDT
Created attachment 458031 [details]
Screenshot
Comment 7 Jay C 2022-04-21 07:23:28 PDT
Hi Myles,

An example of this bug happening is at https://www.demostack.com/resources.

1. Scroll down to the "Recent posts" section
2. Open the filter menus there next to the search field
3. You'll see Times New Roman in Safari for the <options> even though a sans-serif is specifically set