Skip to content

Commit ec51c13

Browse files
committed
Dropdown closing when Share nad Delete are closing for a more natural UX
1 parent 7174ce5 commit ec51c13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client/modules/IDE/components/SketchList.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ class SketchList extends React.Component {
214214
role="presentation"
215215
className="sketch-list__action-option"
216216
onClick={() => {
217+
this.closeAllDropdowns();
217218
this.props.cloneProject(sketch.id);
218219
}}
219220
>
@@ -223,6 +224,7 @@ class SketchList extends React.Component {
223224
role="presentation"
224225
className="sketch-list__action-option"
225226
onClick={() => {
227+
this.closeAllDropdowns();
226228
this.props.showShareModal(sketch.id, sketch.name);
227229
}}
228230
>
@@ -233,8 +235,8 @@ class SketchList extends React.Component {
233235
className="sketch-list__action-option"
234236
onClick={(e) => {
235237
e.stopPropagation();
238+
this.closeAllDropdowns();
236239
if (window.confirm(`Are you sure you want to delete "${sketch.name}"?`)) {
237-
this.closeAllDropdowns();
238240
this.props.deleteProject(sketch.id);
239241
}
240242
}}

0 commit comments

Comments
 (0)