-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
InputMask exception #3177
Comments
I have tried to reproduce it in Chrome, Firefox, and Edge. It works without any errors on my side. |
i have done another project, similar and is functional, but at this point i not understand what can be, some dependency? i have removed the dir bootstrap and open-iconic, as writed in the doc for bootstrap5, in the new project and old |
So, it is working now? |
no, i try to replicate (as much possible) the old project on the test project, but on the test project is functional, is java side of inputmask that make exception, but on test project no, old & test project are on the same computer, so i think is some configuration, i copyed program.cs (are very similar), maynlayout have only the inputmask, removed directory bootstrap & openicon, insert on the test project, the same library from the old, copyed the index.html, changed bootstrap5 to bootstrap, disable authentication, and many other things, but already solution not found, the error is ever the same |
Do you have any subdirectory url routing configured on Startup? |
PS. I will today release the new 0.9.5.1 with some fixes. Maybe it will help. |
sure i try, maybe if i attach the visualstudio-js-debugger file can help? `WebAssemblyHostBuilder builder = WebAssemblyHostBuilder.CreateDefault(args);
|
It is now released https://blazorise.com/news/release-notes/095-1 Please let us know if it helps. |
no, vs 0.9.5.1 not solve the problem... :( |
BlazorApp1.zip |
Working without any issues on my machine. |
Can you try Ctrl+F5 once again? |
done, same problem, i'm preparing another virtual machine to install only vs2022 and try |
nope, also on the new virtual machine, same error, but i not understand why if i do a new project the control goes |
i found the problem: in my program.cs i have this: builder.Services if you put ChangeTextOnKeyPress = true nothing happen if you click outside component after select & enter it! i think is some problem with timing |
Thank you for investigating this. I have figured it. The problem is that both Blazor and inputmask are using the same input event and they "fight" over it. I will need to see what can be done to fix it. |
with this code:
<InputMask Alias="datetime" InputFormat="dd/mm/yyyy" OutputFormat="ddmmyyyy" />
i get:
blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Cannot read property 'toString' of null
TypeError: Cannot read property 'toString' of null
at c (https://localhost:7214/_content/Blazorise/vendors/inputmask.js:8:54579)
at HTMLInputElement.c (https://localhost:7214/_content/Blazorise/vendors/inputmask.js:8:79350)
at de (https://localhost:7214/_framework/blazor.webassembly.js:1:26757)
at ae.tryApplyValueProperty (https://localhost:7214/_framework/blazor.webassembly.js:1:25579)
at ae.tryApplySpecialProperty (https://localhost:7214/_framework/blazor.webassembly.js:1:24580)
at ae.applyEdits (https://localhost:7214/_framework/blazor.webassembly.js:1:21556)
at ae.updateComponent (https://localhost:7214/_framework/blazor.webassembly.js:1:20334)
at https://localhost:7214/_framework/blazor.webassembly.js:1:56876
at Object.St.Te._internal.renderBatch (https://localhost:7214/_framework/blazor.webassembly.js:1:57248)
at Object.Rt [as invokeJSFromDotNet] (https://localhost:7214/_framework/blazor.webassembly.js:1:59934)
Microsoft.JSInterop.JSException: Cannot read property 'toString' of null
TypeError: Cannot read property 'toString' of null
at c (https://localhost:7214/_content/Blazorise/vendors/inputmask.js:8:54579)
at HTMLInputElement.c (https://localhost:7214/_content/Blazorise/vendors/inputmask.js:8:79350)
at de (https://localhost:7214/_framework/blazor.webassembly.js:1:26757)
at ae.tryApplyValueProperty (https://localhost:7214/_framework/blazor.webassembly.js:1:25579)
at ae.tryApplySpecialProperty (https://localhost:7214/_framework/blazor.webassembly.js:1:24580)
at ae.applyEdits (https://localhost:7214/_framework/blazor.webassembly.js:1:21556)
at ae.updateComponent (https://localhost:7214/_framework/blazor.webassembly.js:1:20334)
at https://localhost:7214/_framework/blazor.webassembly.js:1:56876
at Object.St.Te._internal.renderBatch (https://localhost:7214/_framework/blazor.webassembly.js:1:57248)
at Object.Rt [as invokeJSFromDotNet] (https://localhost:7214/_framework/blazor.webassembly.js:1:59934)
at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled[Int32,RenderBatch,Object,Object](String identifier, Int32 arg0, RenderBatch arg1, Object arg2, Int64 targetInstanceId)
at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled[Int32,RenderBatch,Object](String identifier, Int32 arg0, RenderBatch arg1)
at Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer.UpdateDisplayAsync(RenderBatch& batch)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
window.Module.s.printErr @ blazor.webassembly.js:1
Te._internal.dotNetCriticalError @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.tj42mwroj7.js:1
(anonymous) @ 00945abe:0x8065b
(anonymous) @ 00945abe:0x689a7
(anonymous) @ 00945abe:0x17bac4
(anonymous) @ 00945abe:0x172bc5
(anonymous) @ 00945abe:0xb47cc
(anonymous) @ 00945abe:0x11875
(anonymous) @ 00945abe:0x15f1e2
(anonymous) @ 00945abe:0x80614
(anonymous) @ 00945abe:0x689a7
(anonymous) @ 00945abe:0x17bac4
(anonymous) @ 00945abe:0x172bc5
(anonymous) @ 00945abe:0xb47cc
(anonymous) @ 00945abe:0x16602
fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.tj42mwroj7.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_BeginInvokeDotNet @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_BeginInvokeDotNet:19
beginInvokeDotNetFromJS @ blazor.webassembly.js:1
b @ blazor.webassembly.js:1
invokeMethodAsync @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
invokeWhenHeapUnlocked @ blazor.webassembly.js:1
S @ blazor.webassembly.js:1
C @ blazor.webassembly.js:1
dispatchGlobalEventToAllElements @ blazor.webassembly.js:1
onGlobalEvent @ blazor.webassembly.js:1
t.trigger @ inputmask.js:8
blurEvent @ inputmask.js:8
l @ inputmask.js:8
Show 2 more frames
browserLink:2843
To Reproduce
enter component
click/enter another component
Expected behavior
no exception
Note
if i add Value=@aaa as parameter and aaa is not initialized or "" i get exception, if aaa="15122010" nothing happen
blazorise 0.9.5 vs2022 bootstrap 5
The text was updated successfully, but these errors were encountered: