Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

QInput with trim and debounce swallows space while typing #17663

Open
cyrillbolliger opened this issue Nov 26, 2024 · 0 comments
Open

QInput with trim and debounce swallows space while typing #17663

cyrillbolliger opened this issue Nov 26, 2024 · 0 comments
Labels
area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@cyrillbolliger
Copy link

What happened?

If using v-model.trim on QInput together with debounce, trailing spaces get swallowed while typing.

The following screencast shows the issue:

Screen.Recording.2024-11-26.at.16.41.08.mov

The exact sequence of keys pressed in the screencast above: a, s, d, f, , a, s, d, f. Please note the timing between the keystrokes (short pause before the , long pause after).

What did you expect to happen?

After entering a, s, d, f, , a, s, d, f, the model of the input should hold the value asdf asdf, regardless of the keystroke timing.

Reproduction URL

https://jsfiddle.net/12jswtre/29/

How to reproduce?

  1. Go to the provided reproduction link
  2. Focus the input field in the rendered fiddle
  3. Type asdf (with the trailing space). Ensure you type quickly (< 1s between the keystrokes)
  4. Wait 1s
  5. Type asdf again

After step 4 you may observe that the cursor jumped back by one character (because the trailing space was removed).

Flavour

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

Areas

Components (quasar)

Platforms/Browsers

Firefox, Chrome, Safari

Quasar info output

Operating System - Darwin(24.1.0) - darwin/arm64
NodeJs - 21.5.0

Global packages
  NPM - 10.2.4
  yarn - 1.22.21
  pnpm - Not installed
  bun - 1.1.34
  @quasar/cli - 2.4.1
  @quasar/icongenie - Not installed
  cordova - Not installed

Important local packages
  quasar - 2.17.4 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 2.0.0-rc.4 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.16.13 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.5.13 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.5.0
  pinia - Not installed
  vuex - Not installed
  vite - 6.0.0-beta.10 -- Native-ESM powered web dev build tool
  vite-plugin-checker - Not installed
  eslint - 8.57.1 -- An AST-based pattern checker for JavaScript.
  esbuild - 0.24.0 -- An extremely fast JavaScript and CSS bundler and minifier.
  typescript - Not installed
  workbox-build - Not installed
  register-service-worker - Not installed
  electron - Not installed
  @electron/packager - Not installed
  electron-builder - Not installed
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Networking
  Host - MacBook-Air-von-Cyrill.fritz.box
  en0 - 192.168.178.108

Relevant log output

No response

Additional context

No response

@github-actions github-actions bot added area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite labels Nov 26, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

1 participant