0 Replies Latest reply on Feb 3, 2009 3:35 AM by Richard_Abbott

    Odd behaviour with brought-forward HTML element

    Richard_Abbott Level 3
      Hi all,
      I wonder if anyone has encountered the following issue. I have found a work-around but if anyone has a better solution then I'd be interested to hear. The set up is:

      1) A Flex app on a page which uses (among other things) a menu-type custom component based on a VBox using LinkButtons as menu items, positioned near the top left corner.
      2) One menu option loads an external HTML fragment into a DIV also on the main page.
      3) The Flex app uses wmode=opaque amongst the parameters.
      4) The DIV initially has visibility='hidden' and z-index='-1' amongst the CSS attributes, which are replaced by an ExternalInterface call to JavaScript to set visibility='visible' and z-index='20'.
      5) Originally I set the size and position of the DIV to be where I wanted it on the page overall, more or less in the middle and in particular well away from the "menu") and just toggled its visibility attributes.

      Now, the HTML fragment is rather long, so I then set the CSS attribute overflow='scroll' to force the DIV to stay the same size and use scrollbars. However (and I am finally getting to the point!) this had the odd behaviour that the menu mouse-over effect was triggered both over the menu itself, and also on the same relative coordinates in the DIV. So, for example, the link button rollover colour was set both in the obvious place and also in the corresponding part of the DIV (and hence the wrong place on the page). This happened only when overflow='scroll' or 'auto' was used, not 'visible', and only in Firefox 3, not IE7, Safari etc.

      My workaround was to set the DIV placement and size somewhere harmless, and change these coordinates in the ExternalInterface call as well as the visibility-related ones, but this seemed rather hacky.

      Has anyone come across anything similar? And if so how did you resolve it?

      Thanks in advance, Richard