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;
}
Hello Ricardo,
Thank you for the code snippet. I will research this use case and follow up with you once I have news to share.
Regards,
John
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
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
and24.2.6
: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