Skip to content

Commit

Permalink
add ff comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Nov 29, 2024
1 parent 766e34e commit 76f61df
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
*/
import { useRefEffect } from '@wordpress/compose';

/**
* In Firefox, the `draggable` and `contenteditable` attributes don't play well
* together. When `contenteditable` is within a `draggable` element, selection
* doesn't get set in the right place. The only solution is to temporarily
* remove the `draggable` attribute clicking inside `contenteditable` elements.
*
* @return {Function} Cleanup function.
*/
export function useFirefoxDraggableCompatibility() {
return useRefEffect( ( node ) => {
function onDown( event ) {
Expand Down

0 comments on commit 76f61df

Please sign in to comment.