diff --git a/src/index.css b/src/index.css index 2823c160..de8cd8dc 100644 --- a/src/index.css +++ b/src/index.css @@ -12,6 +12,7 @@ max-width: 100%; vertical-align: bottom; display: block; + cursor: pointer; } &-preloader { diff --git a/src/ui.ts b/src/ui.ts index 931bca72..7c27e849 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -251,7 +251,14 @@ export default class Ui { } }); - this.nodes.imageContainer.appendChild(this.nodes.imageEl); + const imageEl = this.nodes.imageEl; + this.nodes.imageContainer.appendChild(imageEl); + + this.nodes.imageEl.addEventListener('click', () => { + this.toggleStatus(UiState.Empty); + this.nodes.imageContainer.removeChild(imageEl); + this.onSelectFile(); + }); } /**