diff --git a/editor/svg-editor.html b/editor/svg-editor.html
index d1cc6c0f..5cb52e0c 100644
--- a/editor/svg-editor.html
+++ b/editor/svg-editor.html
@@ -411,7 +411,7 @@ script type="text/javascript" src="locale/locale.min.js">
-
+
diff --git a/editor/svg-editor.js b/editor/svg-editor.js
index 95469c92..64385262 100644
--- a/editor/svg-editor.js
+++ b/editor/svg-editor.js
@@ -2024,7 +2024,7 @@ function svg_edit_setup() {
{sel:'#tool_path', fn: clickPath, evt: 'click', key: 6},
{sel:'#tool_text', fn: clickText, evt: 'click', key: 7},
{sel:'#tool_image', fn: clickImage, evt: 'mouseup', key: 8},
- {sel:'#tool_zoom', fn: clickZoom, evt: 'mouseup', dblclick: dblclickZoom, key: 9},
+ {sel:'#tool_zoom', fn: clickZoom, evt: 'mouseup', key: 9},
{sel:'#tool_clear', fn: clickClear, evt: 'click', key: [modKey+'N', true]},
{sel:'#tool_save', fn: function() { editingsource?saveSourceEditor():clickSave()}, evt: 'click', key: [modKey+'S', true]},
{sel:'#tool_open', fn: clickOpen, evt: 'click', key: [modKey+'O', true]},
@@ -2110,11 +2110,15 @@ function svg_edit_setup() {
}
}
});
+
+ // Misc additional actions
// Make "return" keypress trigger the change event
$('.attr_changer, #image_url').bind('keydown', {combi:'return'},
function(evt) {$(this).change();evt.preventDefault();}
);
+
+ $('#tool_zoom').dblclick(dblclickZoom);
},
setTitles: function() {
$.each(key_assocs, function(keyval, sel) {
diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js
index 56309ae1..487e6e4e 100644
--- a/editor/svgcanvas.js
+++ b/editor/svgcanvas.js
@@ -1091,6 +1091,7 @@ function BatchCommand(text) {
}
var svgCanvasToString = function() {
+ // TODO: Find out why Webkit throws an error somewhere here (breaking the editor)
removeUnusedGrads();
canvas.clearPath(true);
$.each(svgcontent.childNodes, function(i, node) {
@@ -1104,6 +1105,8 @@ function BatchCommand(text) {
svgcontent.removeAttribute('viewBox');
var output = svgToString(svgcontent, 0);
assignAttributes(svgcontent, {id: 'svgcontent', 'viewBox':[0,0,res.w,res.h].join(' ')});
+ svgcontent.removeAttribute('width');
+ svgcontent.removeAttribute('height');
return output;
}