Skip to content

DateBox: fix mask behavior with Chinese MS IME backspace and refocus (T1331089)#34129

Open
r-farkhutdinov wants to merge 1 commit into
DevExpress:26_1from
r-farkhutdinov:26_1_T1331089
Open

DateBox: fix mask behavior with Chinese MS IME backspace and refocus (T1331089)#34129
r-farkhutdinov wants to merge 1 commit into
DevExpress:26_1from
r-farkhutdinov:26_1_T1331089

Conversation

@r-farkhutdinov

Copy link
Copy Markdown
Contributor

No description provided.

@r-farkhutdinov r-farkhutdinov self-assigned this Jun 25, 2026
Copilot AI review requested due to automatic review settings June 25, 2026 15:11
@r-farkhutdinov r-farkhutdinov requested a review from a team as a code owner June 25, 2026 15:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 deleteContentBackward InputEvent in 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',
})
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants