@fy-/fws-vue 2.3.34 → 2.3.36
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.
|
@@ -269,7 +269,7 @@ const handleBackdropClick = useDebounceFn((event: MouseEvent) => {
|
|
|
269
269
|
<!-- Modal panel -->
|
|
270
270
|
<div
|
|
271
271
|
ref="modalRef"
|
|
272
|
-
:class="`relative ${mSize} max-w-6xl max-h-[85vh] px-
|
|
272
|
+
:class="`relative ${mSize} max-w-6xl max-h-[85vh] px-0 box-border bg-white rounded-lg shadow dark:bg-fv-neutral-900 flex flex-col`"
|
|
273
273
|
:style="{ zIndex }"
|
|
274
274
|
tabindex="-1"
|
|
275
275
|
@click.stop
|
|
@@ -295,7 +295,7 @@ const handleBackdropClick = useDebounceFn((event: MouseEvent) => {
|
|
|
295
295
|
</button>
|
|
296
296
|
</div>
|
|
297
297
|
<!-- Content area -->
|
|
298
|
-
<div :class="`p-
|
|
298
|
+
<div :class="`p-2 space-y-3 flex-grow ${ofy}`">
|
|
299
299
|
<slot />
|
|
300
300
|
</div>
|
|
301
301
|
</div>
|
|
@@ -260,46 +260,31 @@ function focusInput() {
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
/**
|
|
263
|
-
* Handle pasting text
|
|
263
|
+
* Handle pasting text - without debounce for direct response
|
|
264
264
|
*/
|
|
265
|
-
|
|
265
|
+
function handlePaste(e: ClipboardEvent) {
|
|
266
266
|
if (!textInput.value || isMaxReached.value) return
|
|
267
267
|
|
|
268
268
|
// Prevent the default paste behavior
|
|
269
269
|
e.preventDefault()
|
|
270
270
|
|
|
271
|
-
|
|
271
|
+
// Get clipboard data
|
|
272
|
+
const clipboardData = e.clipboardData
|
|
272
273
|
if (!clipboardData) return
|
|
273
274
|
|
|
275
|
+
// Get the pasted text
|
|
274
276
|
const text = clipboardData.getData('text')
|
|
275
|
-
if (!text.trim()) return
|
|
276
|
-
|
|
277
|
-
// Replace all instances of separators with a standard comma
|
|
278
|
-
const pasteText = text.replace(getSeparatorRegex(true), ',')
|
|
279
|
-
|
|
280
|
-
// Insert the text at the cursor position
|
|
281
|
-
const selection = window.getSelection()
|
|
282
|
-
if (selection && selection.rangeCount > 0) {
|
|
283
|
-
const range = selection.getRangeAt(0)
|
|
284
|
-
range.deleteContents()
|
|
285
|
-
range.insertNode(document.createTextNode(pasteText))
|
|
286
|
-
|
|
287
|
-
// Set cursor position to the end of the inserted text
|
|
288
|
-
range.setStartAfter(range.endContainer)
|
|
289
|
-
range.collapse(true)
|
|
290
|
-
selection.removeAllRanges()
|
|
291
|
-
selection.addRange(range)
|
|
292
|
-
}
|
|
293
|
-
else {
|
|
294
|
-
// Fallback if no selection: just set the content
|
|
295
|
-
textInput.value.textContent = pasteText
|
|
296
|
-
}
|
|
277
|
+
if (!text || !text.trim()) return
|
|
297
278
|
|
|
298
|
-
// Process the
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
279
|
+
// Process the text (replace separator characters)
|
|
280
|
+
const pasteText = text.replace(/[,;]/g, ',')
|
|
281
|
+
|
|
282
|
+
// Simply set the content - the most reliable approach
|
|
283
|
+
textInput.value.textContent = pasteText
|
|
284
|
+
|
|
285
|
+
// Add tags immediately
|
|
286
|
+
addTag()
|
|
287
|
+
}
|
|
303
288
|
|
|
304
289
|
/**
|
|
305
290
|
* Handle keyboard navigation between tags - optimized with element lookup caching
|