Skip to content

Commit

Permalink
Allow drag for plaintext-only contenteditable elements
Browse files Browse the repository at this point in the history
  • Loading branch information
smbkr committed Jan 15, 2024
1 parent 013bfce commit 86b1365
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ function isAnInteractiveElement(parent: Element, current: ?Element) {
return true;
}

// contenteditable="true" or contenteditable="" are valid ways
// contenteditable="true", contenteditable="" and contenteditable="plaintext-only" are valid ways
// of creating a contenteditable container
// https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable
const attribute: ?string = current.getAttribute('contenteditable');
if (attribute === 'true' || attribute === '') {
if (attribute === 'true' || attribute === '' || attribute === "plaintext-only") {
return true;
}

Expand Down

0 comments on commit 86b1365

Please sign in to comment.