Skip to content

Razor Components bound textarea not working properly without WebSocket #6301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wanton7 opened this issue Jan 2, 2019 · 1 comment
Closed
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue

Comments

@wanton7
Copy link

wanton7 commented Jan 2, 2019

Describe the bug

If you disable WebSocket for BlazorHub then textarea that uses bind, then textarea starts reverting to earlier text while you are writing to it.
I wanted to test Razor Components with higher latency so I wanted to disable WebSocket so browsers throttling will work.

To Reproduce

@page "/oddness"

<textarea style="width:100%;resize:vertical" rows="5" bind-value-oninput="@Text"></textarea>
<div>@Text</div>

@functions {
    string Text { get; set; }
}

Then instead of app.UseServerSideBlazor<App.Startup>(); use

app.UseSignalR(route => route.MapHub<BlazorHub>(BlazorHub.DefaultPath, opts => opts.Transports &= ~Microsoft.AspNetCore.Http.Connections.HttpTransportType.WebSockets));
app.UseBlazor<App.Startup>();

If you apply browser throttling (added latency) it will get much worse.

Expected behavior

That textarea would work normally

Additional context

I used these NuGets

<PackageReference Include="Microsoft.AspNetCore.Components.Browser" Version="0.8.0-preview1-20181126.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.Build" Version="0.8.0-preview1-20181126.4" PrivateAssets="all" />
@Eilon Eilon added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Jan 2, 2019
@danroth27 danroth27 added the area-blazor Includes: Blazor, Razor Components label Feb 6, 2019
@mkArtakMSFT
Copy link
Member

Thanks for contacting us, @wanton7.
We believe this is dupe of #8204.

@mkArtakMSFT mkArtakMSFT added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Apr 5, 2019
@mkArtakMSFT mkArtakMSFT removed area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels May 9, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

4 participants