<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>325133</bug_id>
          
          <creation_ts>2026-09-24 01:54:31 -0700</creation_ts>
          <short_desc>The select picker stays open when the element stops being a dropdown box</short_desc>
          <delta_ts>2026-09-24 22:41:14 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>324529</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne van Kesteren">annevk</reporter>
          <assigned_to name="Anne van Kesteren">annevk</assigned_to>
          <cc>cdumez</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2254019</commentid>
    <comment_count>0</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2026-09-24 01:54:31 -0700</bug_when>
    <thetext>Setting size or multiple on a &lt;select&gt; whose base appearance picker is open leaves
the picker showing. The element picks up the list box rules from
selectMultipleAndListBox.css, so it lays out a correctly sized but empty list box,
while its options stay slotted in the still-showing popover and render in the top
layer above the page. :open keeps matching a list box.

Steps:
1. Enable Enhanced HTML select element for multiple and list box.
2. &lt;select style=&quot;appearance: base-select&quot;&gt; with a few options, and
   ::picker(select) { appearance: base-select }.
3. Click it to open the picker.
4. From the console, select.multiple = true.

No size attribute is needed: preferredSize() goes 1 to 4 through the
m_multiple ? 4 : 1 fallback, so supportsPickerPseudoElement() becomes false while
the popover is still showing.

Nothing closes the picker on this transition:

- attributeChanged() for sizeAttr invalidates style and renderers, calls
  setRecalcListItems() and invalidateButtonText(), and never touches the popover.
- parseMultipleAttribute() computes oldBoxType != boxType() and uses it only to
  invalidate style.
- Both queuePickerCloseForAppearanceChange() call sites key on usedAppearance()
  flipping away from Base, which a size or multiple change does not do.

pickOrToggleOption()&apos;s hidePickerPopoverElement() recovers the select.size = N
variant, but it sits behind if (!m_multiple), so it never fires for the multiple
case. Popover light dismiss recovers both, but not until the user clicks away.

Suggested fix: key on supportsPickerPseudoElement() going false across the attribute
change rather than on the attribute differing, so size 4 to 5 does nothing and 1 to 2
closes. Prefer the queued close to calling hidePickerPopoverElement() synchronously,
since attributeChanged() can run under ScriptDisallowedScope during parsing, which
means parameterizing the console message that currently names the appearance property.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2254062</commentid>
    <comment_count>1</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2026-09-24 05:28:22 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/74800</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2254475</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-09-24 22:40:08 -0700</bug_when>
    <thetext>Committed 321876@main (dd515af3c07b): &lt;https://commits.webkit.org/321876@main&gt;

Reviewed commits have been landed. Closing PR #74800 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2254476</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-09-24 22:41:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/188362270&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>