Skip to content

Commit

Permalink
fix ui bug with back button not clearing screen choices
Browse files Browse the repository at this point in the history
  • Loading branch information
max-mapper committed Dec 23, 2015
1 parent 60cbf2c commit 9716639
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ ui.buttons.destroy.addEventListener('click', function (e) {
})

ui.buttons.share.addEventListener('click', function (e) {
var sourcesList = document.querySelector('.capturer-list')
sourcesList.innerHTML = ''
ui.hide(ui.containers.choose)
ui.show(ui.buttons.back)
try {
Expand All @@ -94,7 +96,6 @@ ui.buttons.share.addEventListener('click', function (e) {
if (err) return error(err)
ui.hide(ui.containers.choose)
ui.show(ui.containers.capturer)
var sourcesList = document.querySelector('.capturer-list')
var id = 0
sources.forEach(function (source) {
var thumb = source.thumbnail.toDataUrl()
Expand Down Expand Up @@ -202,6 +203,7 @@ function showChoose () {
ui.hide(ui.containers.share)
ui.hide(ui.containers.join)
ui.hide(ui.buttons.back)
ui.hide(ui.containers.capturer)
}

var externalLinks = document.querySelectorAll('.open-externally')
Expand Down

0 comments on commit 9716639

Please sign in to comment.