quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time
https://quasar.dev
MIT License
25.78k stars 3.5k forks source link

[QInput] use mask when using Chinese IME. It will automatically add the last number when the words reach "/" . #16618

Open jhsunlee opened 10 months ago

jhsunlee commented 10 months ago

What happened?

I am using a QInput with mask : ####/##/## or date. and bascially my computer's default language is chinese, so when i focus the input, the IME is Chinese. once i typed date in number pad like "2023" the mask's result will become : "2023/3". it will automatically add another "3". I found if my language is set to English, it works fine without adding extra number. So it only happened if i use Chinese, and type number in the number pad. it happened to the character before "/".

What did you expect to happen?

when i use Not English IME status, and type in number pad. not automatically add the last number when the typed words reach "/".

Reproduction URL

https://codepen.io/jasonlee0829/pen/yLZKVWM

How to reproduce?

  1. use chinese IME
  2. type number "2023" in number pad.
  3. it will shows "2023/3"

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite), Components (quasar), Directives (quasar), Plugins (quasar), Composables (quasar), Style & Identity (quasar), Quasar Extras (@quasar/extras), TypeScript Support, SPA Mode

Platforms/Browsers

Chrome

Quasar info output

Operating System - Windows_NT(10.0.22621) - win32/x64
NodeJs - 18.17.1

Global packages
  NPM - 9.6.7
  yarn - 1.22.19
  @quasar/cli - 2.2.3
  @quasar/icongenie - Not installed
  cordova - Not installed

Important local packages
  quasar - 2.14.0 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 1.7.0 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.16.8 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.3.8 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.2.5
  pinia - 2.1.7 -- Intuitive, type safe and flexible Store for Vue
  vuex - Not installed
  vite - 2.9.16 -- Native-ESM powered web dev build tool
  eslint - 8.53.0 -- An AST-based pattern checker for JavaScript.
  electron - Not installed
  electron-packager - Not installed
  electron-builder - Not installed
  register-service-worker - 1.7.2 -- Script for registering service worker, with hooks
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Relevant log output

No response

Additional context

No response

autukill commented 7 months ago

After an afternoon of research, I found that the 'q-input' component is functioning properly. The cause of this error lies with the input method. I tested using Sogou Input Method and encountered no issues; previously, I had been using Microsoft Input Method.

16629