Window.Current.SizeChanged not working in Edge Chromium

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
fangeles
Posts: 52
Joined: Wed Jan 16, 2019 12:48 am

Window.Current.SizeChanged not working in Edge Chromium

Postby fangeles » Tue Nov 26, 2019 2:05 am

Hi,

I have noticed that the Window.Current.SizeChanged is not working on the latest Dev channel of Microsoft Edge Chromium.

Reference versions are below:

-Microsoft Edge Chromium Version 80.0.334.3 (Official build) dev (64-bit)
-CSHTML5 2.0.0-alpha51-071


It is working fine on latest version of Google Chrome.

Thanks.

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: Window.Current.SizeChanged not working in Edge Chromium

Postby JS-Support @Userware » Tue Nov 26, 2019 2:13 am

Hi,

CSHTML5 uses the "onresize" event of the JS "window" class, as shown at line 145 of the "Window.cs" class:
https://github.com/cshtml5/CSHTML5/blob ... /Window.cs

Could you please test the following JSFiddle and report whether the size of the window is reported correctly when you resize the window?
https://jsfiddle.net/api/mdn/

Thanks

fangeles
Posts: 52
Joined: Wed Jan 16, 2019 12:48 am

Re: Window.Current.SizeChanged not working in Edge Chromium

Postby fangeles » Tue Nov 26, 2019 2:15 am

The page reported 404

https://jsfiddle.net/api/mdn/

fangeles
Posts: 52
Joined: Wed Jan 16, 2019 12:48 am

Re: Window.Current.SizeChanged not working in Edge Chromium

Postby fangeles » Tue Nov 26, 2019 2:19 am

Attached is the result on the console once I change the browser size:
Attachments
sizechange_error_edgechromium.png
sizechange_error_edgechromium.png (28.79 KiB) Viewed 18303 times

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: Window.Current.SizeChanged not working in Edge Chromium

Postby JS-Support @Userware » Tue Nov 26, 2019 2:31 am

Thanks.

Here is the correct JSFiddle link:
http://jsfiddle.net/ostapische/AkqP4/

fangeles
Posts: 52
Joined: Wed Jan 16, 2019 12:48 am

Re: Window.Current.SizeChanged not working in Edge Chromium

Postby fangeles » Tue Nov 26, 2019 3:02 am

I have tested it, width and height is retrieved successfully when viewed on Edge Chromium.

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: Window.Current.SizeChanged not working in Edge Chromium

Postby JS-Support @Userware » Tue Nov 26, 2019 7:12 am

Could you please check the option "Pause on caught exceptions" as shown on the following page:
http://www.cshtml5.com/documentation/ti ... javascript

and then, when the exception is raised, move up the call stack until you arrive in the code of "CSHTML5.js". There you can see why the error happens.

The JavaScript code that you see there should be very similar to the original C# code at:
https://github.com/cshtml5/CSHTML5

If you wish to modify that C# code to fix this issue, and recompile to "CSHTML5.js", you will find a tutorial at the GitHub link above.

Thanks a lot.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 46 guests

 

 

cron