quasarframework / quasar

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

Q-Input with both mask and debounce causes ctrl+v to not store in the model when the model is already filled #17568

Open swl1020 opened 1 week ago

swl1020 commented 1 week ago

What happened?

A q-input field with a mask, for example "##########", and a debounce of 75 or higher.

If you type some text into the input, then quickly delete the input (either buy highlighting and pressing backspace, or by highlighting and ctrl-x'ing it) and then quickly paste the same (or different) text, the model ends up being empty.

What did you expect to happen?

The model should contain what was pasted.

Reproduction URL

https://codepen.io/Sean-Lambert/pen/wvVoRBd?editors=101

How to reproduce?

1) Go to the link 2) fill out the input (eg. 111111) 3) highlight the text 4) quickly delete the text either by pressing backspace or ctrl-x 5) quickly paste text back into the input. Either an already copied string, or using the cut from step 4. 6) you should notice the model is now empty

Flavour

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

Areas

Components (quasar)

Platforms/Browsers

Chrome

Quasar info output

$ quasar info command

Operating System - Linux(6.8.0-45-generic) - linux/x64
NodeJs - 18.20.2

Global packages
  NPM - 10.5.0
  yarn - 1.22.19
  @quasar/cli - undefined
  @quasar/icongenie - Not installed
  cordova - Not installed

Important local packages
  quasar - 2.15.4 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 1.8.5 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.16.11 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.4.26 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.3.2
  pinia - 2.1.7 -- Intuitive, type safe and flexible Store for Vue
  vuex - Not installed
  vite - 2.9.18 -- Native-ESM powered web dev build tool
  eslint - 8.57.0 -- An AST-based pattern checker for JavaScript.
  electron - Not installed
  electron-packager - 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
  @quasar/quasar-app-extension-qmarkdown - 2.0.0-beta.10 -- Display inline markdown in your Quasar App

Networking
  Host - 7667b70b9fd0
  eth0 - 172.19.0.4

Relevant log output

No response

Additional context

No response

Dtsiantaris commented 4 days ago

You can also reproduce but just typing really fast, not just with past. Also it has nothing to do with highlighting all the text. For example you can:

  1. Type '22'
  2. Backspace (model becomes '2')
  3. Fast type another number
  4. Model gets stack as '2'

PS1: You HAVE to type the same character for this to happen. So in step 3 you have to type '2' again. PS2: Cannot reproduce this without mask.