Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safari crashes on tooltips with custom formatter that nests tags #1596

Closed
bryjohns opened this issue Mar 14, 2013 · 4 comments
Closed

Safari crashes on tooltips with custom formatter that nests tags #1596

bryjohns opened this issue Mar 14, 2013 · 4 comments

Comments

@bryjohns
Copy link

When using a custom formatter for tooltip, nested elements cause safari to crash on rendering

option:
tooltip: { formatter: function() { return '<span><b>anything</b></span>'; } }

Demo Fiddle: Hover over point to try to get a tooltip in Safari and browser will crash
http://jsfiddle.net/eMzAx/4/

System error generated: WebProcess(1864) deny file-write-create /private/var/folders/kg/bswwcsln7b79m9xfsyzq8dqr0000gn/C/com.nvidia.OpenGL/0361820C-7006-3AB4-91A1-D589847D8455/6D02605500A88383/2188CE7D-394B-344E-8C8D-10B6E7147DCC.toc

Tested on osx 10.7.5 and safari 6.0.2

@TorsteinHonsi
Copy link
Collaborator

Confirmed in Highcharts 2.3.5 and v3 candidate.

@four43
Copy link

four43 commented Apr 25, 2013

I am having a similar issue with Mobile Safari on iOS 6 as well as Mobile Chrome, which I believe uses the same renderer for iOS devices.

Confirmed with jsFiddle above.
iPhone 5
iOS version 6.1
Mobile Chrome 26.0.1410.53
Mobile Safari (unsure of version)

EDIT: Also nice work @bryjohns for figuring out it was the tooltip. I have a pretty large config I am using for my testing and couldn't pinpoint what it was.

@mcguish
Copy link

mcguish commented Jun 4, 2013

I'm seeing the same problem on Safari, Version 6.0.4 (and OS X v.10.7.5., like @bryjohns)

Is there a work around or ETA for a fix?

Thanks.

@TorsteinHonsi
Copy link
Collaborator

The error happens on trying to read getBBox() on the text element after the text has been set with nested tags. Attempting to run element.offsetWidth also causes a crash, so it appears that Safari is overly sensitive to any kind of touch on these elements.

Nested tags aren't really supported anyway in the Highcharts HTML subset parser, and what happens currently is that the outer tags are replaced with empty tspans. This is probably what makes Safari crash. So the fix will be simply to filter out these empty tspans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants