-
-
Notifications
You must be signed in to change notification settings - Fork 112
Comparing changes
Open a pull request
base repository: vikramlearning/blazorbootstrap
base: main
head repository: vikramlearning/blazorbootstrap
compare: features/otp-input
- 7 commits
- 0 files changed
- 1 contributor
Commits on Jan 5, 2026
-
Configuration menu - View commit details
-
Copy full SHA for cdc2a0d - Browse repository at this point
Copy the full SHA cdc2a0dView commit details
Commits on Jan 7, 2026
-
Refactor OTPInput JS interop, add CharExtensions
- Refactored OTPInput component to use more specific JS interop functions: replaced FocusElement with FocusInputElement and added SetInputElementValue for programmatically clearing input fields. - Added debug Console.WriteLine statements to OTPInput for easier tracing. - Updated OTP input margin class from MarginEnd1 to MarginEnd2 for improved spacing. - Added a new CharExtensions static class with an IsAlphanumeric extension method for char.
Configuration menu - View commit details
-
Copy full SHA for f997370 - Browse repository at this point
Copy the full SHA f997370View commit details -
Improve OTP input sanitization and focus handling
Refactored the OnInput method to sanitize input by allowing only digits, handle pasted or fast-typed multiple digits by using the last digit, and clear invalid input both in state and DOM. Updated the input field if the raw value doesn't match the sanitized digit and streamlined focus movement logic. Removed unnecessary else branches and debug statements for cleaner code.
Configuration menu - View commit details
-
Copy full SHA for 976ac09 - Browse repository at this point
Copy the full SHA 976ac09View commit details
Commits on Jan 31, 2026
-
Improve OTPInput paste handling and JS interop safety
- Allow multi-digit paste by setting maxlength=6 on input fields. - Distribute pasted digits across OTP fields and update focus accordingly. - Add SafeInvokeVoidAsync to safely wrap JS interop calls. - Replace direct JSRuntime.InvokeVoidAsync calls with SafeInvokeVoidAsync to handle component disposal and JS runtime disconnects gracefully. - Remove old logic that only used the last digit on multi-digit input. - Improves robustness and user experience during input and navigation.
Configuration menu - View commit details
-
Copy full SHA for 7f01ef4 - Browse repository at this point
Copy the full SHA 7f01ef4View commit details -
Improve JS interop reliability with SafeInvokeVoidAsync
Introduce SafeInvokeVoidAsync in BlazorBootstrapComponentBase to safely handle JSRuntime calls, preventing exceptions on disposal or JS disconnect. Refactor all components to use this method instead of direct JSRuntime.InvokeVoidAsync calls. Add isJsRuntimeAvailable flag to skip future JS calls after disconnect. Enhance Tabs disposal logic and remove redundant SafeInvokeVoidAsync from OTPInput. Add global using for Microsoft.JSInterop. Update PDF JS initialization to check for canvas existence before creating Pdf instance.
Configuration menu - View commit details
-
Copy full SHA for a10a6fd - Browse repository at this point
Copy the full SHA a10a6fdView commit details -
Refactor JS interop: add JsInteropBase, unify error handling
Introduce JsInteropBase to centralize JS module management and safe invocation for Blazor components. Refactor PdfViewerJsInterop, SortableListJsInterop, and ThemeSwitcherJsInterop to inherit from this base class, removing redundant DisposeAsync logic. Replace direct JSRuntime.InvokeVoidAsync calls with SafeInvokeVoidAsync across components (charts, Demo, Snippet, Toasts) to handle disconnects and cancellations gracefully. Remove unused JS property from Demo. Improves robustness and maintainability of JS interop throughout the codebase.
Configuration menu - View commit details
-
Copy full SHA for 653d4b7 - Browse repository at this point
Copy the full SHA 653d4b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for c58955c - Browse repository at this point
Copy the full SHA c58955cView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...features/otp-input