maui
maui copied to clipboard
TextArea is not working (Maui Blazor)
Description
Sometimes when I`m opening page with textarea and trying to input something there its working fine and sometimes not, after executing this method
Custom Highlight.razor, usage of Highlight.razor
Steps to Reproduce
- Open page Protect.razor
- Click obfuscate button
- By default listening logs by Serilog via some sinks and outputting this text into this textarea (in this case in Custom Highlight.razor)
- Error that says (Microsoft.JSInterop.JSException: 'Cannot read properties of null (reading 'scrollHeight')), or everything works fine, this is random I don`t even have an idea, after changing page to another then returning to Protect.razor page and trying to output something you will get an the same error on empty output.

Click button Protect


Link to public reproduction project repository
https://github.com/sunnamed434/BitMono/tree/main/BitMono/BitMono.GUI
Version with bug
7.0 Release Candidate 2
Last version that worked well
6.0.400
Affected platforms
Windows
Affected platform versions
Windows 11
Did you find any workaround?
I noticed that after executing InvokeAsync(StateHasChanged) causes this error, but this is not an workaround actually..
Relevant log output
Microsoft.JSInterop.JSException: 'Cannot read properties of null (reading 'scrollHeight')
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
I can still repro this. I cloned the repo and switched to this branch: https://github.com/sunnamed434/BitMono/tree/v0.4.0-alpha.9 (the code was since removed from the main branch). I then changed all the net6.0 in the repo to net8.0 and was able to run the project and follow the repro steps.
I've spent quite a bit of time trying to get to the bottom of this, but unfortunately the repro is too complex to be able to make much progress. It's not clear to me where the bug would likely be (Blazor core? BlazorWebView? WebView2? A bug in the app's code?).
For now unfortunately I am choosing to close the bug until we can get a simpler reproduction of this, or at least more reports of the same/similar issue that would increase the priority.