Unplanned
Last Updated: 08 Apr 2025 10:59 by ADMIN
DRASKO
Created on: 28 Mar 2025 12:11
Category: Popup
Type: Bug Report
1
Popup is not properly positioned when the anchor is dynamic

Hello,

related to my previous bug report.

I have a Dialog that contains a Coordinates textbox which when focused shows a Popup with a Map under that text box.

When the Form model is set in OnInitializedAsync() the Popup is shown under the anchor textbox as expected:

 

But when the Form model is set in OnAfterRender, the Popup is incorrectly positioned to the upper left (0, 0) corner:

 

The position of the popup should behave correctly regardless of where the Form model is set.

 

Attached Files:
3 comments
ADMIN
Nadezhda Tacheva
Posted on: 08 Apr 2025 10:59

Hi DRASKO,

I agree, the problem still occurs and I confirm it is a bug.

The status of the bug report is currently "Unplanned" meaning that it is a valid bug that must be scheduled for fixing. We prioritize the fixes based on their severity, how often one may hit them and what is the community demand. Once we change the status to "Planned", you will get an email for that.

Unfortunately, I cannot think of a feasible workaround for this bug. My suggestion is to use the Popover component instead.

Regards,
Nadezhda Tacheva
Progress Telerik

Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!

DRASKO
Posted on: 04 Apr 2025 08:21

It still does not solve the problem. 

If I open and close the window multiple times the pop-up is positioned correctly only the first time the window is opened.

This is clearly a bug, I don't understand why it is set as unplanned.

Is there a workaround that can fix the issue so the window can be opened and closed multiple times with the popup having the correct position?

ADMIN
Nadezhda Tacheva
Posted on: 03 Apr 2025 13:58

Hi DRASKO,

I've isolated this scenario, too, and narrowed down to problem to the Popup's anchor being dynamic.

Here is a simplified version that shows the issue: https://blazorrepl.telerik.com/wJYoEnvR25LdGPoB16.

To reproduce it:

  1. Run the snippet - the Popup anchor (the button inside the Window) is rendered.
  2. Click the button - the Popup is opened properly under its anchor.
  3. Close the Window to dispose the anchor.
  4. Open the Window and click the button inside - the Popup position is wrong.

In your case, the issue appears when the Form model is set in the OnAfterRender() as the Form and the input that is the Popup anchor render after initialization.

For the time being, I'd recommend setting the Form model in OnInitializedAsync(), so you don't hit this issue.

Regards,
Nadezhda Tacheva
Progress Telerik

Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!