I was playing with Element.absolutize/relativize and found that if the DIV you''re manipulating contains an image, that image will disappear once relativize is executed after absolutize in IE 7. In the example below, the image will vanish, but the text behave as expected. Can anyone verify this? Does anyone have a work-around? I''m using Prototype 1.60. Here''s the test case: <table border=''1'' width=''760'' height=''500''> <tr> <td> <div id=''block''> <img src="Sample.gif" /> # TEST # </div> </td> </tr> </table> <script language=javascript> function setBlock() { $(''block'').absolutize() $(''block'').relativize() } window.setTimeout("setBlock()",1000) </script> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I can confirm. Can you try this patch: http://dev.rubyonrails.org/attachment/ticket/9168/relativize_fix.diff --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Could relate to this error with positionedOffset, viewportOffset TR/TD inner content disappears: http://dev.rubyonrails.org/ticket/10228 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Nope, no luck on either of those. The absolutize part of it works, it''s the relativize part that makes it vanish. Strangely enough, if I do: $(''block'').absolutize() $(''block'').relativize() $(''block'').absolutize() ...the image reappears, but that''s not what I need to do. On Apr 8, 10:04 pm, jdalton <John.David.Dal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Could relate to this error with positionedOffset, viewportOffset TR/TD > inner content disappears:http://dev.rubyonrails.org/ticket/10228--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I did manage to make a work-around. If you make the image a CSS background it seems to work fine. Go figure. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
This is a bug with elements inside a TD that are position "static" being turned into postion "relative". This causes the image elements to disappear in IE inside the element (even nested elements). Since this is not related to elements that where relative or absolute this bug isn''t directly related to relativize or absolutize, but another bug entirely. To solve you issue after calling use: element.relativize().setStyle(''position:static''); - JDD --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---