@fy-/fws-vue 2.3.33 → 2.3.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -260,24 +260,31 @@ function focusInput() {
260
260
  }
261
261
 
262
262
  /**
263
- * Handle pasting text with debounce
263
+ * Handle pasting text - without debounce for direct response
264
264
  */
265
- const handlePaste = useDebounceFn((e: ClipboardEvent) => {
265
+ function handlePaste(e: ClipboardEvent) {
266
266
  if (!textInput.value || isMaxReached.value) return
267
267
 
268
- const clipboardData = e.clipboardData ?? (window as any).clipboardData
268
+ // Prevent the default paste behavior
269
+ e.preventDefault()
270
+
271
+ // Get clipboard data
272
+ const clipboardData = e.clipboardData
269
273
  if (!clipboardData) return
270
274
 
275
+ // Get the pasted text
271
276
  const text = clipboardData.getData('text')
272
- if (!text.trim()) return
277
+ if (!text || !text.trim()) return
273
278
 
274
- const pasteText = text.replace(getSeparatorRegex(true), ',')
279
+ // Process the text (replace separator characters)
280
+ const pasteText = text.replace(/[,;]/g, ',')
275
281
 
276
- // Set the text content directly, rather than appending
282
+ // Simply set the content - the most reliable approach
277
283
  textInput.value.textContent = pasteText
278
- e.preventDefault()
284
+
285
+ // Add tags immediately
279
286
  addTag()
280
- }, 50)
287
+ }
281
288
 
282
289
  /**
283
290
  * Handle keyboard navigation between tags - optimized with element lookup caching
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.3.33",
3
+ "version": "2.3.35",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fy-to/FWJS#readme",