Results 1 to 10 of 10

Thread: 6.2.1 bug in onTargetOver when a window was shown with a QuickTipManager.register

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-23611 in 6.5.2.
  1. #1
    Sencha Premium User
    Join Date
    Jan 2017
    Posts
    23

    Post 6.2.1 bug in onTargetOver when a window was shown with a QuickTipManager.register

    When a window is shown that has a QuickTip and the window is closed every element on the view behind throws an exception in onTargetOver trying to access the target of the QuickTip. This causes a large amount of errors and tooltips for the underlying view to not be shown. This works fine in 6.0.2.

    Code:
    listeners: {
        xtype: 'datefield',
        itemId: 'EffectiveDate',
        afterrender: function (editor) {
           Ext.tip.QuickTipManager.register({
              target: editor.getId(),
              text: 'The date.'
           });
        }
     }
    Ext.fly(registeredTarget.target) is null in onTargetOver b/c it is trying to access the datefield.

    https://fiddle.sencha.com/#view/editor&fiddle/1pbi

  2. #2

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha Premium User
    Join Date
    Jan 2017
    Posts
    23

    Default

    Can I get a workaround for this? Without it I don't think we'll be able to upgrade from 6.0.2 to 6.2.1

  4. #4
    Sencha User
    Join Date
    Feb 2017
    Posts
    2

    Default

    I have the same issue with the null in the onTargetOver, but in my case this is when registering the QuickTips on an image.
    Within Ext.fly, it calls dom = Ext.getDom(dom); This returns el.dom, which is null.

    My workaround is to create the image in a displayfield. This may not be appropriate in your case, but may help others in a similar situation to me.

    {
    xtype: 'displayfield',
    value: '<img class="icon-help" data-qtip="Your text here"></img>'
    }


    css

    .icon-help {
    background-image: url("icons/help.png") !important;
    margin-left: 2px;
    margin-right: 2px;
    /* width and height to match actual icon. auto is unreliable */
    width: 16px;
    height: 16px;
    }

  5. #5
    Sencha User
    Join Date
    Feb 2017
    Posts
    2

    Default

    I have been doing a bit more investigation into this and have discovered that the control that causes the error is in a destroyed state, so it appears the quick tip is not being unregistered automatically.
    What I did was to unregister the quick tip on the beforeDestroy event and this has fixed the issue.

    listeners: {
    beforeDestroy: function (control, eopts)
    { var el = control.getEl();

    if (el) {
    Ext.QuickTips.unregister(el);

    if (el.dom) {
    el.dom.removeAttribute('data-qtip');
    }
    }
    }
    }

  6. #6
    Sencha Premium User
    Join Date
    Jan 2017
    Posts
    23

    Default

    This is still an issue in 6.5.0. Is this going to be fixed soon? In 6.2.2 or a quick 6.5.1?

  7. #7

    Default

    Hi Martin , Your solution is working , but i have used hundreds of Quick tips in my application , is there any way we can add your solution to override QuickTip js file

  8. #8
    Sencha Premium Member
    Join Date
    Oct 2015
    Posts
    22

    Default

    Same here, we have lots and lots of tooltips and would really appreciate a workaround. We already tried unregistering the tooltips in destroy methods but that would be a lot of work.

  9. #9
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258

    Default

    We'll look into fixing this in a future release, however it's worth pointing out that the pattern being used will lead to a memory leak.

    If you're registering these tips via the element, then you should also be cleaning them up using the unregister method when the element goes away. A better way would be to attach the quicktip attributes directly into the DOM element, then you don't need to worry about registering or unregistering.

  10. #10

    Default

    Quote Originally Posted by evant View Post
    We'll look into fixing this in a future release, however it's worth pointing out that the pattern being used will lead to a memory leak.

    If you're registering these tips via the element, then you should also be cleaning them up using the unregister method when the element goes away. A better way would be to attach the quicktip attributes directly into the DOM element, then you don't need to worry about registering or unregistering.

    By "A better way would be to attach the quicktip attributes directly into the DOM element"

    Do you mean adding quicktip via `data-qtip` attribute ?

Similar Threads

  1. Replies: 2
    Last Post: 9 May 2012, 6:12 AM
  2. Replies: 7
    Last Post: 11 Apr 2012, 3:40 AM
  3. Close window register only on success: true
    By fabio.policeno in forum Sencha Ext JS Q&A
    Replies: 7
    Last Post: 8 Oct 2011, 6:56 PM
  4. How to register enter key on Window?
    By livinglegends in forum Ext 3.x: Help & Discussion
    Replies: 7
    Last Post: 26 May 2010, 6:14 AM
  5. How can I register for endDrag event for Ext.Window?
    By rojar in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 6 Feb 2009, 4:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •