Ticket T1285680
Visible to All Users

DropDown not working in Popup

created 6 days ago (modified 6 days ago)

I need to open a DropDown inside a Popup to edit a form, but it is not allowing focus on the TextBox.

I have already tried to treat the z-index as described Ticket, but without a solution.

Razor
<div class="target-container" @onclick="@(() => PopupVisible = true)"> <p class="target-caption">CLICK TO SHOW A POP-UP WINDOW</p> </div> <DxPopup @bind-Visible="@PopupVisible" ShowFooter="true" HeaderText="Edit Contact"> <BodyContentTemplate Context="body"> <div id="dropdown-overview-target-container"> <DxButton Click="() => IsOpen = !IsOpen" RenderStyle="@ButtonRenderStyle.Secondary" aria-describedby="dropDown-overview">SHOW A DROPDOWN</DxButton> </div> </BodyContentTemplate> <FooterContentTemplate> <DxButton CssClass="popup-button my-1 ms-2" RenderStyle="ButtonRenderStyle.Primary" Text="OK" Click="@(() => PopupVisible = false)" /> <DxButton CssClass="popup-button my-1 ms-2" RenderStyle="ButtonRenderStyle.Secondary" Text="Cancel" Click="@(() => PopupVisible = false)" /> </FooterContentTemplate> </DxPopup> <DxDropDown @bind-IsOpen="@IsOpen" Id="dropDown-overview" HeaderVisible="true" HeaderText="Header" PositionMode="DropDownPositionMode.Bottom" Width="max(25vw, 250px)" PositionTarget="#dropdown-overview-target-container" RestrictionTarget="#Navigation-DropDown-Overview" CloseMode="DropDownCloseMode.Close" PreventCloseOnPositionTargetClick="true"> <BodyTemplate> <DxTextBox @bind-Text="@card" ></DxTextBox> </BodyTemplate> </DxDropDown> @code { bool IsOpen { get; set; } = false; bool PopupVisible { get; set; } string card; }
Show previous comments (1)

    Hello John,

    Have you managed to find a solution to this problem? This is causing a delay in delivering a feature to a client.

    Thanks,
    Ricardo

    John (DevExpress Support) 2 days ago

      Hello Ricardo,

      Thank you for your patience.

      I tried my best to reproduce the issue in multiple versions of DevExpress Blazor, but I didn't manage to. As you can see in the following screencast, the editor can be focused in versions 24.2.3 and 24.2.6:

      Clipboard-File-1.png

      Note that I used the exact same code that you shared initially. I attached the sample projects where I tested it. Would you please modify any of them to replicate the problematic behavior? This way, we can offer you more precise recommendations for your use case. We'll do our best to help.

      Kind regards,
      John

        Hello John,

        Thanks for the feedback, it really is working perfectly in your projects, I created a new one to try to reproduce the problem and in this project that I am attaching, it is possible to reproduce it.

        I am missing something, because I was only able to reproduce the problem when I add a DxDateEdit component, without it the DxPopup does not even open.

        I have already reviewed all the settings, including comparing them with your project, but I have not identified what I am forgetting, could you please help me with this?

        Thanks again,

        Ricardo

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.