1. #1
    Ext User
    Join Date
    Jun 2008
    Location
    Williamsburg, VA
    Posts
    10
    Vote Rating
    0
    adam.schwartz is on a distinguished road

      0  

    Default [FIXED] Popup not hiding -> ComponentEvent.type is not set

    [FIXED] Popup not hiding -> ComponentEvent.type is not set


    I perused the forums a bit and didn't see this mentioned yet. Sorry for the spam if I missed it.

    Using GXT beta 5 download, the Popup widget would not perform its autohide behavior correctly, so I opened it up and found that in handleEventPreview(ComponentEvent ce) the switch(ce.type) { ... } was never being entered. This is because ce.type isn't set correctly, so wherever ce.type is referenced I changed it to "ce.event.getTypeInt()". So the function now looks like this:

    @Override
    protected boolean handleEventPreview(ComponentEvent ce) {
    switch (ce.event.getTypeInt()) {
    case Event.ONMOUSEDOWN:
    case Event.ONMOUSEUP:
    case Event.ONMOUSEMOVE:
    case Event.ONCLICK:
    case Event.ONDBLCLICK: {
    if (DOM.getCaptureElement() == null) {
    if (!ce.within(getElement())) {
    if (isAutoHide() && (ce.event.getTypeInt() == Event.ONCLICK) || ce.isRightClick()) {
    if (navPopup.getIgnoreList() != null) {
    for (int i = 0; i < navPopup.getIgnoreList().size(); i++) {
    Element elem = (Element) navPopup.getIgnoreList().get(i);
    if (DOM.isOrHasChild(elem, ce.getTarget())) {
    return true;
    }
    }
    }
    if (onAutoHide(ce.event)) {
    hide();
    return true;
    }
    }
    return false;
    }
    }
    break;
    }
    case Event.ONKEYUP:
    handleKeyUp(ce);
    break;
    }
    return true;
    }
    };

    ...and it works now.

    So someone who knows this codebase better than I ... does this sound like an appropriate workaround?

    Cheers,
    Adam

  2. #2
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Good timing on your find. Popup was refactored today and now uses BaseEventPreview internally. All the code you reference is now removed and auto hide now works.

    Changes are in SVN.

  3. #3
    Ext User
    Join Date
    Jun 2008
    Location
    Williamsburg, VA
    Posts
    10
    Vote Rating
    0
    adam.schwartz is on a distinguished road

      0  

    Default


    Great! Thanks for all the hard work Darrell.

    Best,
    Adam

  4. #4
    Ext User
    Join Date
    Jun 2008
    Location
    Williamsburg, VA
    Posts
    10
    Vote Rating
    0
    adam.schwartz is on a distinguished road

      0  

    Default


    I'm still having no luck with a Popup auto-hiding, and spotty behavior with explicitly toggling hide/show. Even just creating a basic Popup in a viewport doesn't autohide:

    public class SimplePopup implements EntryPoint
    {
    public void onModuleLoad()
    {
    final Viewport vp = new Viewport();
    RootPanel.get().add(vp);

    final Popup navPopup = new Popup();
    navPopup.add( new HTML("VOILA!"));
    navPopup.setSize(300, 300);
    navPopup.showAt(30, 0);
    }
    }

    After throwing in some debugging statements I notice hide() and afterHide() never get called. If I invoke hide() manually by overriding onAutoHide(), it works. If I subsequently call show() it will only reappear if setAnimate(true).

    Am I missing something fundamental, or might this still be buggy?

    Best,
    Adam

    ExtGWT version: Latest SVN build
    Ubuntu Hardy, FF3

  5. #5
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    There was still a few issues with Popup. Both bugs are fixed, changes are in SVN.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi