Hello,
I have issues to drag draggable true dialog windows on edge browser.
this is true for my own dialog windows as for your demo dialog windows. (at least on my computer)
i guess there is a specific issue with edge ?
Do you have some specific solution for this issue on edge ?
thanks
enchev
January 25, 2023, 3:36pm
2
Not sure where or how to reproduce this:
Here is what I see on Edge using the same demo:
[dialog-drag-edge]
ouch...
reading the end of the thread i have exactly the same issue
if i resize the window i can only drag horizontaly but it's a unlimited dragging since my only way to "undrag" the window is to clic to "esc"
by the way: Version 109.0.1518.61 (Official build) (64 bits)
ok guys i have some news about this... believe me or not but here it what happens:
this code makes a window draggable and resizable !!
public async Task ShowPdf()
{
if(SelectedItem != null)
{
int iDrawingID = SelectedItem[0].Id;
await DialogService.OpenAsync<DialogCardPage>($"Drawing {SelectedItem[0].Drawing}",
new Dictionary<string, object>() { { "DrawingID", iDrawingID } },
new DialogOptions() { Width = "1505px", Height = "905px", Resizable = true, Draggable = true });
}
else
{
}
}
this one isn't neither draggable nor resizable (still on edge)
public async Task ShowPdf()
{
if(SelectedItem != null)
{
int iDrawingID = SelectedItem[0].Id;
await DialogService.OpenAsync<DialogCardPage>($"Drawing {SelectedItem[0].Drawing}",
new Dictionary<string, object>() { { "DrawingID", iDrawingID } },
new DialogOptions() { Width = "1500px", Height = "900px", Resizable = true, Draggable = true });
}
else
{
}
}
Width = "XXXXpx", Height = "YYYYpx" values have a big influence on the bug...
maybe is there a link with the margin between window and its item fields ?
at least that works like this for me,
playing with these values solved that issue.
Regards
Joro
January 31, 2023, 8:17am
5
Buntaflex:
Width = "XXXXpx", Height = "YYYYpx" values have a big influence on the bug...
maybe is there a link with the margin between window and its item fields ?
at least that works like this for me,
playing with these values solved that issue.
Is this DialogCardPage component with a fixed size of 1500px X 900px?
i don't really get your question, but now by playing with the dimension values in the dialog options i can have a draggable and resizable window.
Just play with the values
here is my code for the call of the window and the window code when it opens:
The call:
public async Task ShowPdf()
{
if(SelectedItem != null)
{
int iDrawingID = SelectedItem[0].Id;
await DialogService.OpenAsync<DialogCardPage>($"Drawing {SelectedItem[0].Drawing}",
new Dictionary<string, object>() { { "DrawingID", iDrawingID } },
new DialogOptions() { Width = "1605px", Height = "1000px", Resizable = true, Draggable = true });
}
else
{
}
}
once again, i changed my dimensions values... 1600px width is not draggable when 1605px is...
i willingly oversized the window in comparison of its content but there is no direct effect so i suppose the main thing is only the value in itself
the dialogcardpage code:
@page "/dialogcard/{DrawingID}"
@using HmcOdata
@inject HmcOdataService service
@inject DialogService DialogService
<div class="d-flex justify-content-center">
<RadzenCard Style="width: 1500px; Height: 800px; overflow: hidden; border: var(--rz-grid-cell-border)" Class="rz-shadow-0">
<div class="d-flex flex-row">
<iframe width="1500px" Height="800px" src="data:application/pdf;base64,@PDF"></iframe>
</div>
</RadzenCard>
</div>
@code {
[Parameter] public int DrawingID { get; set; }
string PDF;
byte[] rawPDF;
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
DataAccess db = new DataAccess();
PDF = db.GetDrawing(DrawingID);
rawPDF = Convert.FromHexString(PDF);
PDF = Convert.ToBase64String(rawPDF);
}
}
Regards
Joro
January 31, 2023, 9:14am
7
Indeed it appears that he problem is related to the dimensions provided through DialogOptions. I didn't have time to look carefully in Radzen.Blazor code, but it looks like a workaround is possible using the right dimensions. Definitely setting Width and Height to "auto" prevents dragging.