ketekny-ui-kit 1.0.36 → 1.0.37

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ketekny-ui-kit",
3
3
  "type": "module",
4
- "version": "1.0.36",
4
+ "version": "1.0.37",
5
5
  "description": "A Vue 3 UI component library with Tailwind CSS styling",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -43,7 +43,7 @@
43
43
  :disabled="disabled || !isItemSelectable(slotItem)"
44
44
  :title="!isItemSelectable(slotItem) ? 'Row is not selectable' : ''"
45
45
  @mousedown="captureSelectionInteraction"
46
- @click.stop="captureSelectionInteraction"
46
+ @click.stop
47
47
  @change="($event) => handleItemSelectionChange($event, slotItem)"
48
48
  />
49
49
  </div>
@@ -191,6 +191,16 @@ export default {
191
191
  methods: {
192
192
  captureSelectionInteraction(event) {
193
193
  this.pendingShiftSelection = Boolean(event?.shiftKey || this.isShiftKeyPressed);
194
+ if (event?.type === "mousedown" && event?.shiftKey && typeof event.preventDefault === "function") {
195
+ // Prevent browser range-text selection while using Shift+click for row-range selection.
196
+ event.preventDefault();
197
+ }
198
+ if (typeof window !== "undefined" && typeof window.getSelection === "function") {
199
+ const selection = window.getSelection();
200
+ if (selection && typeof selection.removeAllRanges === "function") {
201
+ selection.removeAllRanges();
202
+ }
203
+ }
194
204
  },
195
205
  handleWindowKeydown(event) {
196
206
  if (event?.key === "Shift") {