sp-dev-fx-controls-react icon indicating copy to clipboard operation
sp-dev-fx-controls-react copied to clipboard

SitePicker, ListPicker & FieldPicker occasionally show options in background when using it in a dialog

Open tmaestrini opened this issue 1 year ago • 8 comments

I've made a SPFx extension that renders a modal dialog with some content (text content, TreeView, Menu Bars, input fields) beside a SitePicker, a ListPicker and a FieldPicker. The drowdown options are occasionally rendered behind the modal window which makes them unselectable.

Category

[ ] Enhancement [x] Bug [ ] Question

Version

Please specify what version of the library you are using: 3.17.0

Expected / Desired Behavior / Question

The dropdown options of the components should render in the foreground.

Observed Behavior

After bootstrapping the dialog, the dropdown options of the SitePicker, the ListPicker and the FieldPicker components are rendered, and while remaning «in the background» (behind the modal dialog) they're not selectable anymore. It looks like the component would have a negative z-index in the style attribute – but that's not the case. Refreshing the whole browser window can help from time to time. I have not yet found any pattern in this behaviour.

Screenshot

Steps to Reproduce

  1. Refresh the page
  2. Click the SPFx extension that opens the modal dialog
  3. Select the ListPicker / SitePicker or FieldPicker to bring up the dropdown options

tmaestrini avatar Feb 16 '24 23:02 tmaestrini

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Feb 16 '24 23:02 ghost

Thank you for submitting your first issue to this project.

github-actions[bot] avatar Feb 16 '24 23:02 github-actions[bot]

I have the same problem and I'm running on version 3.16.0. Any progress on this yet?

vofflan avatar Mar 07 '24 12:03 vofflan

Probably this is the same issue as this one: https://github.com/SharePoint/sp-dev-docs/issues/9515

GuidoZam avatar Mar 10 '24 14:03 GuidoZam

Any effort or news on this issue?

tmaestrini avatar Mar 28 '24 22:03 tmaestrini

Any news?

tmaestrini avatar May 05 '24 22:05 tmaestrini

I'm seeing this issue as well, but while using a PeoplePicker in a Panel which is triggered through a List View Command. The first time the command is triggered, the suggestions list shows up properly, and the HTML looks roughly like this:

<div class="ms-Layer ms-Layer--fixed root-238 data-portal-element="true">
	<div class="ms-Fabric ms-Layer-content content-240">
		<!-- This is where the panel is -->
	</div>
</div>
<div id="fluent-default-layer-host" style="style="position: fixed; z-index: 1000000;">
	<div class="ms-Layer ms-Layer--fixed root-238 data-portal-element="true">
		<div class="ms-Fabric ms-Layer-content content-240">
			<!-- This is where the callout is, which contains the suggestion list -->
		</div>
	</div>
</div>

After dismissing the panel and re-triggering it, the elements have swapped places:

<div id="fluent-default-layer-host" style="style="position: fixed; z-index: 1000000;">
	<div class="ms-Layer ms-Layer--fixed root-238 data-portal-element="true">
		<div class="ms-Fabric ms-Layer-content content-240">
			<!-- This is where the callout is, which contains the suggestion list -->
		</div>
	</div>
</div>
<div class="ms-Layer ms-Layer--fixed root-238 data-portal-element="true">
	<div class="ms-Fabric ms-Layer-content content-240">
		<!-- This is where the panel is -->
	</div>
</div>

(The root-238 class gives z-index: 1000000)

And the suggestions list is shown behind the panel. It looks like the order in which the elements are inserted is inconsistent, and since they get the same z-index it can occasionally show up behind a panel/modal (Adding 1 to the z-index of the #fluent-default-layer-host manually makes the dropdown show up correctly)

gjerm avatar May 24 '24 13:05 gjerm

@gjerm Thank you!

pheidler avatar May 30 '24 00:05 pheidler