From da8415d261d7d094b5e1c0e6bff79fdc51b0038c Mon Sep 17 00:00:00 2001 From: Diana Lease Date: Tue, 16 Jun 2020 15:57:16 -0400 Subject: [PATCH] fix(Clause): fixes clauses being uneditable in safari when draggable Signed-off-by: Diana Lease --- .../ui-contract-editor/src/lib/components/Clause/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/ui-contract-editor/src/lib/components/Clause/index.js b/packages/ui-contract-editor/src/lib/components/Clause/index.js index 93016ec8..863b8db2 100644 --- a/packages/ui-contract-editor/src/lib/components/Clause/index.js +++ b/packages/ui-contract-editor/src/lib/components/Clause/index.js @@ -106,6 +106,8 @@ const ClauseComponent = React.forwardRef((props, ref) => { } }; + const setDraggable = (event, draggable) => event.target.closest('.ui-contract-editor__clause').setAttribute('draggable', draggable); + return ( { } - + setDraggable(e, false)} + onMouseLeave={(e) => setDraggable(e, true)} + > {props.children}