This Fixes #973

Now it works in firefox also. I have tested in mac,ubuntu in both firefox and chrome.
@gordonwoodhull :Its fixed and ready for your review.