Commit 3900875
committed
fix: allow copy events on inline objects
The `draggable` attribute on the top-level span in inline objects interfered
with copy events when the attribute was set to `true`. This meant that you
couldn't copy inline objects when the editor was editable, only when it was in
read-only.
The `draggable="true"` attribute changes browser event handling to
prioritize drag operations over selection. This prevents proper DOM
selection from being established, causing the copy event to never fire.
Per the HTML5 Drag and Drop spec, draggable elements cannot be selected
normally - "text or other elements within it can no longer be selected
in the normal way" (MDN). This is a design choice, not a bug.1 parent 5e98297 commit 3900875
2 files changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
84 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
0 commit comments