DateBox: fix mask behavior with Chinese MS IME backspace and refocus (T1331089)#34129
Open
r-farkhutdinov wants to merge 1 commit into
Open
DateBox: fix mask behavior with Chinese MS IME backspace and refocus (T1331089)#34129r-farkhutdinov wants to merge 1 commit into
r-farkhutdinov wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes DateBox masked-input edge cases related to Chinese Microsoft IME Backspace behavior and caret selection after refocus (T1331089).
Changes:
- Added special handling for
deleteContentBackwardInputEventin the masked DateBox keypress pipeline. - Adjusted focus-in behavior in mask mode to select the first date part after refocus, with a guard around clear-button/value-clearing flows.
- Added QUnit coverage for IME backspace and refocus caret selection scenarios.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/datebox.mask.tests.js | Adds regression tests for IME backspace behavior and refocus caret selection in masked DateBox. |
| packages/devextreme/js/__internal/ui/date_box/date_box.mask.ts | Implements new mask-mode handling for IME backspace input events and selects the first date part on focus-in (with a clear-value guard). |
| return; | ||
| } | ||
|
|
||
| if (this._useMaskBehavior() && event?.inputType === IME_BACKSPACE_INPUT_TYPE) { |
Comment on lines
+811
to
+815
| _clearValueHandler(e: ValueChangedEvent & DxEvent): void { | ||
| this._isClearingValue = true; | ||
| super._clearValueHandler(e); | ||
| this._isClearingValue = false; | ||
| } |
Comment on lines
+798
to
+803
| this.$input.trigger($.Event('input', { | ||
| type: 'input', | ||
| originalEvent: $.Event('input', { | ||
| inputType: 'deleteContentBackward', | ||
| }) | ||
| })); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.