Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Mar 2009
    Posts
    21
    Vote Rating
    0
    romero83 is on a distinguished road

      0  

    Default If you have scroll problem with tooltips and comboboxes drop down list

    If you have scroll problem with tooltips and comboboxes drop down list


    Hi!

    These hacks or repairs, fixes the scroll bug on tooltips and comboboxes drop down list position.
    If you have one of these problems, then feel free to use them.
    To use these fixes, you have to hack the GXT jar and build to gain class files.

    First, let's see the tooltip positioning problem:
    The main problem here is that the tooltip position calculated from the sum of mouse x,y coordinates and the body scroll x,y length. This is very cool, but what is the situation, if the scrollbar not suit the body tag, but the html tag. In this situation the mouse pointer gets the right x,y coordinates, but the body scrollbar top and left length always return 0.
    The solution is "maybe" to gets both the body and the html scroll top and left length.
    For this, I added two more native calls in the XDOM.java, whiches gets the html tag scrollTop and scrollLeft length:
    Code:
      /**
       * Return the html elements vertical scroll.
       * 
       * @return the scroll amount in pixels
       */
      public static native int getHtmlScrollTop() /*-{
          return $doc.getElementsByTagName("html")[0].scrollTop;
        }-*/;
    
      /**
       * Return the html elements horizontal scroll.
       * 
       * @return the scroll amount in pixels
       */
      public static native int getHtmlScrollLeft() /*-{
          return $doc.getElementsByTagName("html")[0].scrollLeft;
        }-*/;
    Then I change some rows in the Tip.java, where we examine the getBodyScrollLeft() and getBodyScrollTop()... If these method returns back 0, then it feel as if we are in the top of the page, or we have a scrollbar on the html tag.
    If we on the top of the page and we have the scrollbar on the body tag, then no problem appears, because the getHtmlScrollLeft() and getHtmlScrollTop() are also returns back 0, so it calculates the right coordinates:
    Code:
    public void showAt(int x, int y) {
        ...
        Point p = new Point(x, y);
        p = el().adjustForConstraints(p);
        if ((XDOM.getBodyScrollLeft()==0) && (XDOM.getBodyScrollTop()==0)) {
            p.x += XDOM.getHtmlScrollLeft();
            p.y += XDOM.getHtmlScrollTop();
        }
        else {
            p.x += XDOM.getBodyScrollLeft();
            p.y += XDOM.getBodyScrollTop();
        }    
        setPagePosition(p.x, p.y);
      }
    Second is the comboboxes drop down list position bug. In this case, I hacked the ComboBox.java:
    Code:
    private void restrict() {
        ...
        int y = list.el().getY();
        int b = y + h;
        int vh = XDOM.getViewportSize().height + XDOM.getBodyScrollTop();
        if (b > vh) {
    //      y = y - (b - vh) - 5;
          list.el().setTop(y);
        }
      }
    You see that I commented y = y - (b - vh) - 5;. I think it is not necessary to recalculate the y coordinate for the drop down list, because the list.el().getY(); gets the right coordinate, even if the document has scrollbar, which scrolled down.

    I tested these fixes in Firefox 3 and Internet Explorer 6.

    I hope it helps you and for the GXT team to solve this scrollbar issue, which is not fixed in the version of 1.2.4.

  2. #2
    Ext User
    Join Date
    Feb 2009
    Posts
    5
    Vote Rating
    0
    jhontue is on a distinguished road

      0  

    Thumbs up It works

    It works


    Great It works for me !!! thank you for sharing this, i had the same issue and i didn't find a solution until now. In my case, this issue appears when I use a strict Doctype.

Thread Participants: 1