Opened 6 years ago
Closed 6 years ago
#1771 closed defect (fixed)
citeproc-js breaks initial Quick Copy drag after Firefox startup
| Reported by: | dstillman | Owned by: | simon |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | interface | Version: | 2.1 |
| Keywords: | Cc: | fbennett |
Description
After a restart of Firefox, an initial bibliography Quick Copy drag fails. Subsequent drags (presumably after the engine initialization) work.
I don't know if this is citeproc-js or something in Zotero called by citeproc-js, but I've verified that adding "return {};" before "return new Zotero.CiteProc.CSL.Engine(Zotero.Cite.System, xml, locale);" in style.js and commenting out the lines below "var csl = Zotero.Styles.get(format).csl;" in quickCopy.js (replacing them with placeholders for 'text' and 'html') fixes the problem. Seems like it could also plausibly be a Firefox bug.
Tested on OS X with the trunk in Minefield using APSA as the output format.
Change History (4)
comment:1 Changed 6 years ago by fbennett
comment:2 Changed 6 years ago by dstillman
- Cc fbennett added; simon removed
- Owner changed from fbennett to simon
- Status changed from new to assigned
There's already a try/catch around the call. It's not actually failing, since the engine gets returned—it just breaks the drag.
Let's see if Simon can reproduce.
comment:3 Changed 6 years ago by simon
I can reproduce on OS X. As I recall, an XHR and a number of other things can break a drag. Not sure if this is in citeproc-js or on my end; I'll look into it further.
comment:4 Changed 6 years ago by simon
- Resolution set to fixed
- Status changed from assigned to closed
I'm unable to reproduce this under Linux. Tried both the multilingual branch and 2.1b5, and both drop the bibliography listing on the first attempt, with both OpenOffice and gedit plain text editor. There are issues in both cases (raw HTML in the dropped text under OO, and corrupted Unicode characters in gedit), but the text does appear.
Odd that there would be different behavior on the two platforms. Does a try/catch around the citeproc-js instantiation turn up anything?