Multilingual Zotero: fixes for language support

Quite some time ago, I received reports from Mac users that the language variant pulldowns in MLZ either failed to open or opened erratically.

At the time, I traced the failure to a change in the Firefox internals that caught out Mac users before taking hold in my own environment (Linux). The essential change was deprecation of the document​.popupNode property that was used to grab the field on which to open the menu, in favour of a new popup.triggerNode property. I picked this much up from the Mozilla bug tracker, without paying sufficient attention to the details of the new method. Such is the stuff of which confessions are made.

In initial trials of the triggerNode property on my own system, I couldn’t get it to work, and concluded (wrongly, almost to a certainty) that it had not yet been implemented in the version of Firefox that I was using under Linux. So I “fixed” MLZ with code like the following:

var triggerNode = document.triggerNode ? document.triggerNode : document.popupNode

Right. I assumed that the developers had introduced a new property, set on the same object as the old property, and with the same content as the old property, changing only its name. I did not stop to ask, “Why have they done this?” I should have, because of course they had not. The triggerNode is not a property of document, it is a property of the popup itself — the target node of the event that opened it. Instead, I should have tried something like this:

var triggerNode = event.target.triggerNode

This works under Linux today, as it surely would have done a year ago. Ouch.

The latest MLZ release (ver. 4.0.18m437) includes new code for the language pulldowns. I haven’t yet tested the revision on Mac OSX directly, but MLZ should now be working correctly on all platforms. If you try it and have difficulties, please let me know

My attention was brought to the persistence of this problem by a private fault report from an MLZ user, to whom I owe a word of thanks. There are Mac users among our own students, and I will be very happy to give a progress report at the next Multilingual Zotero workshop here at Nagoya.

This entry was posted in Announcements. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>