Skip to content

[Bug]: Can't open TagPicker #34732

Closed

Description

Component

TagPicker

Package version

9.66.1

React version

18.3.1

Environment

System:
    OS: Windows 11 10.0.26100
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i7-1355U
    Memory: 6.34 GB / 31.69 GB
  Browsers:
    Edge: Chromium (132.0.2957.127)
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    @fluentui/react-components: ^9.66.1 => 9.66.1
    @fluentui/react-datepicker-compat: ^0.4.62 => 0.4.62
    @fluentui/react-migration-v8-v9: ^9.6.46 => 9.8.1
    @fluentui/react-timepicker-compat: ^0.3.0 => 0.3.13
    @types/react: ^18.3.18 => 18.3.23
    @types/react-dom: ^18.3.5 => 18.3.7
    react: ^18.3.1 => 18.3.1
    react-dom: ^18.3.1 => 18.3.1

Current Behavior

The TagPicker component is no longer opening its suggestions list when clicked. It was working correctly yesterday, and no package updates have been made since then. The issue also reproduces in the official StackBlitz example:
https://stackblitz.com/run?file=src%2Fexample.tsx

Expected Behavior

The TagPicker should open and display suggestions on focus/click, especially since no changes or package updates have been made.

Additional context:

  • No relevant code or configuration changes on my side
  • The issue might be related to an upstream dependency or CDN issue affecting the example as well

Reproduction

https://stackblitz.com/run?file=src%2Fexample.tsx

Steps to reproduce

Simply open the official StackBlitz example linked above

Are you reporting an Accessibility issue?

None

Suggested severity

Urgent - No workaround and Products/sites are affected

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Activity

  1. layershifter commented on Jun 26, 2025

    @layershifter
    Contributor

    It's a regression caused by #33978. Affects only Strict Mode / Concurrent in React:

    The fix:

    // @file packages/react-components/react-tag-picker/library/src/components/TagPicker/renderTagPicker.tsx
    
    -        {state.inline ? state.popover : <Portal mountNode={state.mountNode}>{state.popover}</Portal>}
    +        {state.inline ? state.popover : state.popover && <Portal mountNode={state.mountNode}>{state.popover}</Portal>}

    We will also need tweak Portal to emit an error if there are no children passed as new logic relies on children being always present.

    Also looks that usePortalMountNode() needs the following change:

    // @file packages/react-components/react-portal/library/src/components/Portal/usePortalMountNode.ts
    
    -            // If the mountElement has children, the portal is still mounted
    +            // If the mountElement has children, the portal is still mounted, otherwise we can dispose it
                const portalHasNoChildren = targetElement.childNodes.length === 0;
    
                if (portalHasNoChildren) {
    -              return targetElement.remove.bind(targetElement);
    +              elementFactory.dispose();

    Edit: At this point, it might be better to revert #33978 as I see some more troubles with the implementation.

  2. GrahamS-Quartech commented on Jun 26, 2025

    @GrahamS-Quartech

    Is there a temporary workaround until that PR is reverted?

  3. layershifter commented on Jun 27, 2025

    @layershifter
    Contributor

    GrahamS-Quartech downgrade @fluentui/react-portal to 9.5.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions