Skip to content

Commit 247273a

Browse files
author
Ives van Hoorne
committed
Only hide edit icons when module not activated
1 parent ab79dcd commit 247273a

File tree

2 files changed

+5
-1
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry

2 files changed

+5
-1
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EditIcons/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ function EditIcons({
2323
onEdit,
2424
onCreateFile,
2525
onCreateDirectory,
26+
active,
2627
}) {
27-
if (window.__isTouch) {
28+
// Phones need double click if we show elements on click, that's why we only want
29+
// to show these edit icons when the user clicks and hasn't activated the module
30+
if (window.__isTouch && !active) {
2831
return null;
2932
}
3033

packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ class Entry extends React.PureComponent {
161161
onCreateDirectory={onCreateDirectoryClick}
162162
onDelete={deleteEntry && this.delete}
163163
onEdit={rename && this.rename}
164+
active={active}
164165
/>
165166
)}
166167
</Right>

0 commit comments

Comments
 (0)