tooltip sometimes cause the windows resize event

4 posts, 0 answers
  1. ye
    ye avatar
    10 posts
    Member since:
    Aug 2014

    Posted 26 Apr 2015 Link to this post

    hi,when using the tooltip feature of the bar chart,we find sometimes(not always,according to the window initial size ) it will fires the windows resize event.

    chrome is fine ,this problem only occurs in IE8

    our code snippets  :

    var currentHeight;
    var currentWidth;

    $(window).resize(function () {
    var windowHeight = $(window).height();
    var windowWidth = $(window).width();

    if (currentHeight == undefined || currentHeight != windowHeight
    || currentWidth == undefined || currentWidth != windowWidth) {
    currentHeight = windowHeight;
    currentWidth = windowWidth;
    kendo.resize("#ourChartDiv");  // we want to dynamically resize the chart size according to the window size
    }
    });

    we find kendo.resize method will remove the tootip again,so we got the following exception 

    in kendo.ui.js ( Kendo UI v2014.3.1119 )

              var size = {
                    width: this.element.outerWidth(),
                    height: this.element.outerHeight()
                };

    this.element is null 

    I want know how to resolve or avoid this problem ,thanks in advance !

     

  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 29 Apr 2015 Link to this post

    Hi,

    Thank you for the detailed description of the problem.

    The issue was a bit unclear to me from the info provided in ticket 929368.
    Feel free to close the other ticket so we can keep the discussion here.

    My first suggestion is to call the resize method only after e certain threshold. For example:
    if (currentHeight == undefined || Math.abs(currentHeight - windowHeight) > 20)

    Try different values to see if this helps. We will take care of the tooltip code to make sure it doesn't throw an error.
    I hope this helps.

    Regards,
    T. Tsonev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Hector
    Hector avatar
    7 posts
    Member since:
    Jan 2012

    Posted 22 Feb in reply to T. Tsonev Link to this post

    I got the same problem when recreating the chart after applying some filters with the data.  The tooltip produced the same error
  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 24 Feb Link to this post

    Hi Hector,

    I posted a reply in your other thread on the same subject, however here is my answe, too: 

    I used this dojo and tried to reproduce the issue but to no avail (short screencast capture). Could you please modify my example and demonstrate your exact setup? Also, do you observe the problem only in IE 11 (as pointed in the ticket info) or it persits in all major browsers?

    In order to avoid further duplications let's keep the discussion in only one of the threads.

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready