"e" key does not start export on firefox

Bug #1192746 reported by Tristan BENOIST
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
jazzynico
JessyInk
Fix Committed
Medium
Hannes Hochreiner

Bug Description

When opening test presentation "JessyInk_1_5_5_showcase.svg" in firefox (21.0), the "e" key (alone) does not initiate export (no dialog box).

Revision history for this message
Tristan BENOIST (tristan-benoist) wrote :

other keys (d for example) are working.

Revision history for this message
Hannes Hochreiner (hannes-hochreiner) wrote :

Looks like Mozilla deprecated the function JessyInk uses to serialize the document.

https://developer.mozilla.org/en/docs/XMLSerializer

I will try and modify the function to make it work again. Thanks for letting me know.

Changed in jessyink:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Hannes Hochreiner (hannes-hochreiner)
Changed in jessyink:
milestone: none → 1.5.6
Changed in jessyink:
status: In Progress → Fix Committed
Revision history for this message
Sebastian Hofer (sebhofer-gmail) wrote :

Hi Hannes,

is this problem really fixed? I'm using Firefox 24 on Linux Mint Debian and I'm still not getting the export dialog on pressing 'e'. Is this a problem with my setup?

Thanks for JessyInk btw :) I use it a lot!

Revision history for this message
Roland Whitehead (rolandw) wrote :

Hi Hannes,

Unfortunately this problem also occurs in Firefox 27.

Revision history for this message
Tristan BENOIST (tristan-benoist) wrote :

Seems the error is back. The solution is simple as Hannes told, XMLSerilazer.toStream is deprecated. One needs to use toString in replacement.
The fix is the same as the one Hannes gave at the time I posted thos bug. It is the following : Edit your svg file with a text editor. Find the part begining with "// Serialise the new document." It should be :
var serializer = new XMLSerializer();
 var strm =
 {
  content : "",
  close : function() {},
  flush : function() {},
  write : function(str, count) { this.content += str; }
 };

 var xml = serializer.serializeToString(newDoc, strm, 'UTF-8');

 window.location = 'data:application/svg+xml;base64;charset=utf-8,' + window.btoa(strm.content);

Replace this whole block with :
w.location = 'data:application/svg+xml;base64;charset=utf-8,' + window.btoa(unescape(encodeURIComponent((new XMLSerializer()).serializeToString(newDoc))));

This should do the trick waiting for a proper fix or update on the jessyink version included in inkscape.

Revision history for this message
Sebastian Hofer (sebhofer-gmail) wrote :

Tristan,

this indeed works, but only if you replace "w.location" in your code with "window.location" as in the original. Now I also see why export didn't work for me, I think I have to reinstall the javascript in the svg file.

Thanks for the hint!

Revision history for this message
Foivos Zakkak (foivos) wrote :

To fix it for all future presentations in your system apply the corresponding patch.

wget https://bazaar.launchpad.net/~hannes-hochreiner/jessyink/trunk/diff/125 -O /tmp/export.diff
cd /usr/share/inkscape/extensions
sudo patch -p1 < /tmp/export.diff

jazzynico (jazzynico)
Changed in inkscape:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → jazzynico (jazzynico)
milestone: none → 0.91
tags: added: extensions-plugins
Revision history for this message
jazzynico (jazzynico) wrote :

Inkscape still uses Jessyink v1.5.5 and thus is affected by the bug. I'm going to apply the patch from Bug #1397317, comment #1.

@Hannes, I see some of the changes committed between JessyInk r.116 (1.5.5) and r.125 (not tagged in the revision list yet) have already been applied to Inkscape, but not all. I suggest we update JessyInk to the very latest stable version in 0.92 as soon as 0.91 is out. Do you have plans for JessyInk 2.0? Or should we still use the 1.5 branch?

Revision history for this message
jazzynico (jazzynico) wrote :

Fix committed in the 0.91 branch (rev. 13672) and trunk (rev. 13781).

Changed in inkscape:
status: In Progress → Fix Committed
Revision history for this message
Hannes Hochreiner (hannes-hochreiner) wrote :

Please use the 1.5 branch. I have not made much progress on the 2.0 branch and there are still quite a few features missing.

Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.