SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict Mirek Komárek's Avatar
    Join Date
    Dec 2006
    Location
    Prague
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    webkit keep mouseover event on removed node

    I am not sure what I am doing wrong. I am loading some xml files into divs and there are onload function on each XMLHttpRequest which call them. It works perfect (FF,Opera, IE5.5+), but in webkit powered browsers it seems that it can't change function which was loaded (I saw Dean Edwards load again, it not works in this case). When I check the generated source there wasn't that element on which webkit makes mouseover event. It is difficult even explain. Here http://leseni.xf.cz/dotaz/ I uploaded example. When you click part of map it will zoom in with another image map, this one is alredy going through xml, it works well even in webkit, onmouseover it changes xml and switch text and image map and so on, but when you close(remove) it, and zoom in to another part of my republic, it still makes mouseover on removed areas. You can see it best in middle of map, where Prague is. Click Prague, mouseover red point, then close it and try open another one, if you have webkit powered browser it makes mouseover event which shouldn't be there over the place where Prague red point position used to be. I really dont know what to do with this. Some idea, or recomendation what to check?

  2. #2
    SitePoint Addict Mirek Komárek's Avatar
    Join Date
    Dec 2006
    Location
    Prague
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So after a lot of testing, I have add there function purgeEventHandlers (The Theory of The DOM with Doug Crockford) and now it works better, but still drive me mad in webkit. Now it keeps that mouseover event just one time, when I open the same area two times, it starts to use correct event. To which place and node I should put function purgeEventHandlers(node) to persuade webkit works well?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •