Skip to content

Commit

Permalink
Update Bootstrap, fix drag and drop getting stuck
Browse files Browse the repository at this point in the history
  • Loading branch information
corbindavenport committed Mar 11, 2022
1 parent 6dc0864 commit 3a12f44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>PhotoStack</title>
<meta name="description" content="Convert, resize, and add watermarks to images all in your web browser.">
<meta name="robots" content="noindex">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="css/photostack.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<script src="js/shared.js"></script>
Expand Down Expand Up @@ -603,7 +602,7 @@ <h5 class="modal-title" id="photostack-watermark-editor-modal-title"></h5>
<script src="js/array-flat-polyfill.js"></script> <!-- Polyfill for Array.prototype.flat() -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/FileSaver.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jszip.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected].3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/localforage.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/pica.min.js"></script>
<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="sblxtzuush1cfzz"></script>
Expand Down
5 changes: 5 additions & 0 deletions js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,11 @@ document.body.addEventListener('drop', function (e) {
importFiles(files)
})

document.getElementById('photostack-import-file').addEventListener('change', function () {
// This prevents the modal from getting stuck when the 'drop' listener doesn't fire correctly
dragModal.hide()
})

// Prevent default browser drag/drop actions

var eventNames = ['dragenter', 'dragover', 'dragleave', 'drop']
Expand Down

0 comments on commit 3a12f44

Please sign in to comment.