Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    URGENT: Dummy "isc_styleTester" div gets visible when changing styleName

    Hi, I am having issue with "isc_styleTester" div element that gets visible when "styleName" of the HLayout element is being changed.

    So whenever I change style of my HLayout element, it renders that div element
    (sure thing I searched and found the code that creates it in ISC_Core.js). Here is the generated html:
    Code:
    <div class="loginBackgrounden" id="isc_styleTester" style="position: absolute; top: -100px; left: 0px;">
    As you see that DIV is shifted but not enough. My style has a big background image (bigger then 100px), so the DIV with the image becomes visible at the top.

    I kind of solved the issue by finding that element by ID and removing it from DOM manually, but I am wondering if it might cause other issues? What is that DIV for?
    And still sometimes it gets displayed for a tiny moment before it's gone.

    Browsers: IE, Firefox
    SmartClient version that I am working with:
    Version SC_SNAPSHOT-2010-07-27/EVAL Development Only (2010-07-27)

    #2
    It's used to measure the borders, padding and margins on applied styles, since most browsers do not report it accurately in other ways.

    We'll move it further offscreen. In the meantime, a better workaround is to create a Canvas with any other never-before-used style immediately after you create this HLayout.

    Comment


      #3
      We changing the style dynamically after the HLayout object has been created and displayed. And we do not know in advance what will be that style, it's fully dynamic.

      So you are suggesting to create another dummy Canvas object without showing it? Before or after changing style?

      Comment


        #4
        Yes, that works too. After changing to the very tall style, create a Canvas with any style that hasn't been used before. This only needs to be done once.

        Comment


          #5
          How can I know that the style was never used? "Never used" for the element, for the page? It's impossible to keep track of all static and dynamic styles that objects are using on the page. Our pages and forms are fully dynamic. Do you have a cache or so to keep track of used styles that I can access?

          Creating new Canvas every time might be time and memory consuming.
          For me the "better" workaround for now is to remove the element at all.

          When the issue will be fixed? Will you create a patch or it will be only in the next build?

          Comment


            #6
            The change has already been made and the next nightly will have it.

            If you want to pursue a workaround, make a style that is used only for this purpose, and apply it right after using this (presumably very unusual) style. Note that removing the styleTester DIV will not actually work.

            Comment


              #7
              Ok, thank you for quick response.

              I am not the one who making styles, I mean we develop a kind of framework, so I can not know what styles will be used (tall, not tall, used, not used) and when it will be changed.
              So I can do something only in the piece of code that applies the style came from server response (and I have only style name) for certain element (it can be any layout or form item, etc). Imagine if I will create a dummy Canvas every time, that will be resource consuming.
              I think that workaround would be just not suitable for my case.
              I can also try to change the "style" property of the isc_styleTester to shift it farther.

              Comment

              Working...
              X