Switch to Library tab when dragging over EPUB or HTML files as well
This commit is contained in:
parent
3eb1c3fb4f
commit
52c219c8b9
1 changed files with 3 additions and 2 deletions
|
@ -131,13 +131,14 @@ const ZoteroStandalone = new function() {
|
|||
return;
|
||||
});
|
||||
|
||||
// Switch to library tab if dragging over one or more PDF files
|
||||
// Switch to library tab if dragging over PDF/EPUB/HTML file(s)
|
||||
window.addEventListener('dragover', function (event) {
|
||||
// TODO: Consider allowing more (or all) file types, although shouldn't interfere with image dragging to note editor
|
||||
if (Zotero_Tabs.selectedID != 'zotero-pane'
|
||||
&& event.dataTransfer.items
|
||||
&& event.dataTransfer.items.length
|
||||
&& !Array.from(event.dataTransfer.items).find(x => x.type != 'application/pdf')) {
|
||||
&& !Array.from(event.dataTransfer.items).find(x =>
|
||||
!['application/pdf', 'application/epub+zip', 'text/html'].includes(x.type))) {
|
||||
Zotero_Tabs.select('zotero-pane');
|
||||
}
|
||||
}, true);
|
||||
|
|
Loading…
Reference in a new issue