[CLOSED] JS Error opening new tab in MVC app

Page 2 of 2 FirstFirst 12
  1. #11
    The attachment was sent as requested. Here is the text of the email I sent (below)
    /Z


    Please see attached example. I use VS 2010. This is a full MVC example.

    Basically, you just login and I have added a new menu option to the first accordian called "JS CRASH TEST". Go ahead and click on it. This will load a new tab and this new tab will load a gridview with a list of customers. Each customer has an "EDIT" button on the left (Note Icon). As soon as the page loads (dont wait) just go ahead and click on the first note icon. Do not wait for the tooltip to show. I receive the JS error when the new tab tries to load after i click the NOTE icon.



    Quote Originally Posted by Daniil View Post
    Please email to:
    support@object.net
  2. #12
    Thank you.

    As soon as the page loads (dont wait) just go ahead and click on the first note icon. Do not wait for the tooltip to show.
    This may be a key point (did you mention it first time or did I miss this in the thread?).

    Please clarify is the issue specific to any browser? Is is reproducible in all major browsers? Is the IE compatibility mode switched off?
  3. #13
    I have IE8 only which is where this is tested. Compatibility mode IS on. It seems the problem relates to a negative offset for some shadow. I noticed it easier to t reproduce if the tooltip didnt load when building the example.
    /Z

    Quote Originally Posted by Daniil View Post
    Thank you.



    This may be a key point (did you mention it first time or did I miss this in the thread?).

    Please clarify is the issue specific to any browser? Is is reproducible in all major browsers? Is the IE compatibility mode switched off?
    Last edited by Z; Nov 27, 2012 at 4:06 AM.
  4. #14
    Edited the previous posting to show compatibility was on. Now i just tested it in IE 8 with it off and it still has JS error.
    /Z

    Quote Originally Posted by Z View Post
    I have IE8 only which is where this is tested. Compatibility mode IS on. It seems the problem relates to a negative offset for some shadow. I noticed it easier to t reproduce if the tooltip didnt load when building the example.
    /Z
  5. #15
    Downloaded and tested in Firefox 11 and there does not appear to be any JS errors.
    /Z

    Quote Originally Posted by Z View Post
    Edited the previous posting to show compatibility was on. Now i just tested it in IE 8 with it off and it still has JS error.
    /Z
  6. #16
    I was able to reproduce the problem in IE7 only, not in IE8.

    Anyway, this fix should help.

    Fix
    <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />
    
    <script type="text/javascript">
        Ext.Shadow.prototype.realign = function (l, t, w, h) {
            if (!this.el) {
                return;
            }
    
            var a = this.adjusts,
                d = this.el.dom,
                s = d.style,
                iea = 0,
                sw = (w + a.w),
                sh = (h + a.h),
                sws = sw + "px",
                shs = sh + "px",
                cn,
                sww;
    
            s.left = (l + a.l) + "px";
            s.top = (t + a.t) + "px";
    
            if ((s.width != sws && sw >= 0) || (s.height != shs && sh >= 0)) {
                s.width = sws;
                s.height = shs;
    
                if (!Ext.isIE) {
                    cn = d.childNodes;
                    sww = Math.max(0, (sw - 12)) + "px";
                    cn[0].childNodes[1].style.width = sww;
                    cn[1].childNodes[1].style.width = sww;
                    cn[2].childNodes[1].style.width = sww;
                    cn[1].style.height = Math.max(0, (sh - 12)) + "px";
                }
            }
        }
    </script>
    Please put it into the page's <head>.
  7. #17
    Daniil,

    That fix worked just fine and the problem is now gone. Can you please include this into the next release of EXT on 1.x and 2.x branches?

    Thanks!
    /Z

    Quote Originally Posted by Daniil View Post
    I was able to reproduce the problem in IE7 only, not in IE8.

    Anyway, this fix should help.

    Fix
    <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />
    
    <script type="text/javascript">
        Ext.Shadow.prototype.realign = function (l, t, w, h) {
            if (!this.el) {
                return;
            }
    
            var a = this.adjusts,
                d = this.el.dom,
                s = d.style,
                iea = 0,
                sw = (w + a.w),
                sh = (h + a.h),
                sws = sw + "px",
                shs = sh + "px",
                cn,
                sww;
    
            s.left = (l + a.l) + "px";
            s.top = (t + a.t) + "px";
    
            if ((s.width != sws && sw >= 0) || (s.height != shs && sh >= 0)) {
                s.width = sws;
                s.height = shs;
    
                if (!Ext.isIE) {
                    cn = d.childNodes;
                    sww = Math.max(0, (sw - 12)) + "px";
                    cn[0].childNodes[1].style.width = sww;
                    cn[1].childNodes[1].style.width = sww;
                    cn[2].childNodes[1].style.width = sww;
                    cn[1].style.height = Math.max(0, (sh - 12)) + "px";
                }
            }
        }
    </script>
    Please put it into the page's <head>.
  8. #18
    The fix has been added to v1.

    Regarding v2. Please clarify are you able to reproduce it with v2?
  9. #19
    No. We did not test in V2. We just assumed defect was same
    Feel free to close this now.

    /Z


    Quote Originally Posted by Daniil View Post
    The fix has been added to v1.

    Regarding v2. Please clarify are you able to reproduce it with v2?
  10. #20
    I was unable to reproduce.

    If you will face the same issue with Ext.NET v2, please renew this thread.

    Thank you again for the bug report.
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 6
    Last Post: Apr 03, 2012, 1:54 PM
  2. [CLOSED] Error opening window from codeBehind
    By edigital in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 16, 2010, 8:25 AM
  3. error on opening a window
    By Kamal in forum 1.x Help
    Replies: 2
    Last Post: Oct 12, 2009, 5:10 PM
  4. Opening new tab from within a tab
    By xylim in forum 1.x Help
    Replies: 4
    Last Post: Jun 11, 2009, 12:43 AM
  5. opening a page in tab
    By pearl in forum 1.x Help
    Replies: 0
    Last Post: Apr 06, 2009, 5:38 AM

Posting Permissions