JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Window › Window – resize bug
Tagged: Window resize non-modal
- This topic has 4 replies, 2 voices, and was last updated 1 year, 6 months ago by
xyzzy.
-
AuthorPosts
-
July 6, 2021 at 11:35 am #101990
xyzzy
MemberI have a non-modal Window, if I resize the widow by shrinking it disappears.
This only occurs if shrink in both axes or shrink in one axis and the other is the same size.
So if I shrink vertically but grow horizontal and vice-versa, no issues.
<Window OnClose=@OnOneBiggyCanvasClicked Label=”Single Sample” HeaderButtons=@HeaderButtonsOneBiggy ResizeMode=”WindowResizeMode.Both” IsOpened=@OneBiggyOpen Style=”position:center; width:400px; height:400px;” Modal=”false”>
July 6, 2021 at 11:43 am #101991admin
KeymasterHi xyzzy,
We are unable to reproduce this in our demos. Example: https://www.htmlelements.com/angular/demos/window/resizing/
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/July 6, 2021 at 1:21 pm #101992xyzzy
MemberJuly 6, 2021 at 1:24 pm #101993xyzzy
Member<div id=”canvasHolder” style=”position: fixed; width: 100%; height: 100%; left: 0; cursor: @cursor;”>
<BECanvas Width=@CanvasWidth Height=@CanvasHeight @ref=”CanvasRef”></BECanvas>
<Window OnClose=@OnOneBiggyCanvasClicked Label=”Single Sample” HeaderButtons=@HeaderButtonsOneBiggy ResizeMode=”WindowResizeMode.Both” IsOpened=@OneBiggyOpen Style=”position:center; width:400px; height:400px;” Modal=”false”>
<div id=”canvasHolderOneBiggy” style=”z-index:1000; position: fixed; width: 100%; height: 100%; left: 0px; top:40px;”>
<BECanvas Width=@OneBiggyWidth Height=”@OneBiggyWidth” @ref=”CanvasOneBiggyRef”></BECanvas>
</div>
</Window>
</div>July 6, 2021 at 1:53 pm #101994xyzzy
MemberSorry, you can close this – not a bug.
There is an onclick event attached to the BECanvas (attached using JSInterop) that fires a C# method that closes the modal window. When resizing the window smaller the onclick event on the BECanvas is firing when I was not expecting it to as I’m not clicking on it. I’ve attached OnResizeStart and OnResizeEnd events to the Window object to switch a flag on and off that the BECanvas onclick event checks (to ensure window is not being resized) before closing the modal window. -
AuthorPosts
- You must be logged in to reply to this topic.