1

Working with Raphael library, I've got a lot of problems with mouse events in Safari (it just doesn't work on mouse events).

I read it's common, and maybe there is a solution for this (from the documentation):

Paper.safari()

There is an inconvenient rendering bug in Safari (WebKit): sometimes the rendering should be forced. This method should help with dealing with this bug.

by the way, I can't understand how to make it works.. I do like this:

var Paper = new Raphael(document.getElementById("paperId"), '300px', '300px');
Paper.safari();

can you tell me what I'm doing wrong? or, otherwise, is there an alternative solution?

I've been searching for hours, with no results... :(

edit: yes, the problem is about filling a raphael element with an url:

myClass.prototype.PhotoClick = function(){
    var that = this;
    $('.photo').each(
           function(){
                $(this).dblclick(function(event) {
                                        that.loadPhoto[index].attr({fill:"url(images/image1.jpg)"});
                                        });
            });
}

sorry, I don't post more, because the code is a bit messy. however, the array item is a raphael object, and the url path is correct. if I fill the element with a color, everything is fine. just urls give me problems...

hope now it's clearer

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
ateciufit15
  • 81
  • 1
  • 3
  • that function is meant for fixing render quirks, not mouse event issues. please describe the problems you're having in more detail, and provide relevant code snippets. – Eliran Malka Feb 17 '13 at 01:32
  • try and wrap the URI value with quotes, e.g. `fill:"url('images/image1.jpg')"`. – Eliran Malka Feb 18 '13 at 10:59
  • nope..i tried, but the problem seems the be other. do you know any good documentation about raphael and Safari rendering bug? I can't find anything.. :( – ateciufit15 Feb 18 '13 at 13:58

0 Answers0