Skip to content

Commit

Permalink
Fix drag to move in Windows 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustem Mussabekov committed Oct 14, 2024
1 parent 4d7a9b9 commit 554912c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Binary file not shown.
5 changes: 4 additions & 1 deletion src/co/picker/file/drop/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ export default class DropModule extends React.Component {
const found = e.dataTransfer.getData(record.type)
.split('\n')
.map(v=>v.trim())
.filter(v=>URL.canParse(v) && new URL(v).host != location.host)
.filter(v=>{
try { return new URL(v).host != location.host }
catch(e) { return false }
})

for(const link of found)
if (!links.includes(link))
Expand Down

0 comments on commit 554912c

Please sign in to comment.