From 49d9bf34d91b34b987a5642188f35853515fa345 Mon Sep 17 00:00:00 2001 From: Ahmad Syazwan Date: Mon, 26 Mar 2012 07:55:03 +0000 Subject: [PATCH] Fix issue 904 for Chrome on linux git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2068 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 13d0102a..63d200d4 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -2516,10 +2516,11 @@ var getMouseTarget = this.getMouseTarget = function(evt) { tlist.appendItem(svgroot.createSVGTransform()); if(svgedit.browser.supportsNonScalingStroke()) { - //Handle crash for newer Chrome + Windows: https://code.google.com/p/svg-edit/issues/detail?id=904 - // TODO: Remove this workaround (all isChromeWindows blocks) once vendor fixes the issue - var isChromeWindows = svgedit.browser.isChrome() && svgedit.browser.isWindows(); - if(isChromeWindows) { + //Handle crash for newer Chrome: https://code.google.com/p/svg-edit/issues/detail?id=904 + //Chromium issue: https://code.google.com/p/chromium/issues/detail?id=114625 + // TODO: Remove this workaround (all isChrome blocks) once vendor fixes the issue + var isChrome = svgedit.browser.isChrome(); + if(isChrome) { var delayedStroke = function(ele) { var _stroke = ele.getAttributeNS(null, 'stroke'); ele.removeAttributeNS(null, 'stroke'); @@ -2528,13 +2529,13 @@ var getMouseTarget = this.getMouseTarget = function(evt) { } } mouse_target.style.vectorEffect = 'non-scaling-stroke'; - if(isChromeWindows) delayedStroke(mouse_target); + if(isChrome) delayedStroke(mouse_target); var all = mouse_target.getElementsByTagName('*'), len = all.length; for(var i = 0; i < len; i++) { all[i].style.vectorEffect = 'non-scaling-stroke'; - if(isChromeWindows) delayedStroke(all[i]); + if(isChrome) delayedStroke(all[i]); } } }