Last Comment Bug 666955 - Ajax library/ Response.redirects do not work in firefox 5
: Ajax library/ Response.redirects do not work in firefox 5
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: 5 Branch
: x86 Windows XP
: -- normal with 4 votes (vote)
: Firefox 7
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
: 666674 670818 671262 (view as bug list)
Depends on: 666604
Blocks: 583514
  Show dependency treegraph
 
Reported: 2011-06-24 09:34 PDT by herriedm
Modified: 2011-07-28 22:55 PDT (History)
10 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description herriedm 2011-06-24 09:34:54 PDT
User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0

Using Telerik RadPanel/ Radgrid version Q4 2006 version 
Adding ajax functionality to the page.

A response.redirect will throw and error when utilizing ajax.
Response.redirectlocation does not work.
Also adding javascript via RegisterClientStartup also does not work.



Reproducible: Always
Comment 1 (mostly gone) XtC4UaLL [:xtc4uall] 2011-06-24 14:11:35 PDT
Errm, could you provide more Informations please.
Here a Guide to do it the proper Way (expecially a reduced Testcase/URL showing the Issue):
https://developer.mozilla.org/en/Bug_writing_guidelines
Comment 2 herriedm 2011-06-24 22:59:04 PDT
A radgrid contains a bound item, that has a linkbutton.

When clicking the linkbutton, it will call the itemcommand event.  This is fired.

In the itemcommand event if you have a response.redirect ( some page) it will error out.

The grid is ajaxified, along with a radajaxpanel around the grid.

This is a bad bug, and i see more people have this same issue...

Everything worked in firefox 3, not sure what you guys changed.
Comment 3 Jean-Yves Perrier [:teoli] 2011-06-27 03:10:30 PDT
Several people are reporting a problem with ASP.net response.redirect here: http://forums.mozillazine.org/viewtopic.php?f=38&t=2234567

Not convinced it is a Firefox bug (it may be or not), but the users are mixing server-side/client-side languages/snippets, so it is difficult to get usable STR from there comments.
Comment 4 Julien D 2011-06-27 04:38:13 PDT
Hi, 

I experience the same issue, maybe this can help :

In asp.net, if server side you call Response.RedirectLocation = "yourUrl";
it works with  ie8/9, chrome, FF4 and FF3.6. Using FF5, nothing happens.

I'm new to bugzilla, sorry if I posted the wrong way...
Comment 5 Steffan Corley 2011-06-27 10:00:19 PDT
Think this is what's happening, from a quick debug session with the Telerik RadAjax library (http://www.telerik.com/help/aspnet-ajax/ajax-ajaxmanager.html).

The library contains code like this (modified into a fairly minimal testcase):

<html>
  <head></head>
  <body onload="redirect()">
  </body>
  
<script language="javascript">
  function redirect()
  {
    var tmp=document.createElement("a");
    tmp.style.display="none";
    tmp.href="http://www.mozilla.org";
    document.body.appendChild(tmp);
    if(tmp.click){
    try{
    tmp.click();
    }
    catch(e){
    }
    }else{
    window.location.href="http://www.mozilla.org";
    }
  }
</script>
</html>

In Firefox 3.6, tmp.click is undefined.  In Firefox 5, tmp.click is defined, but calling tmp.click() does nothing (possibly throws an exception - not immediately clear a quick initial investigation).

Why they're not just using window.location.href by default is beyond me, but unfortunately, quite a lot of websites will use the Telerik RadAjax library.  Upgrading to a fixed version of the library would cause a lot of pain.
Comment 6 Cam Woods 2011-06-28 15:49:05 PDT
We're seeing this problem too on some custom code.  The problem seems to boil down to a difference between FF5 and previous versions regarding the existence of a.click where a is an anchor tag.

The difference in behaviour can be seen with this simple HTML:

<a id="link" href="http://www.google.com" onclick="if (this.click) alert('click'); else alert('no click'); return false">The link</a>

Clicking on the link in FF 3.6.18 alerts with "no click" whereas in FF 5 it alerts with "click".

The code example above they are testing for (a.click) and calling tmp.click() if found.  Other browsers (IE in particular) will then navigate the anchor as if ther user clicked on it while FF will not.
Comment 7 (mostly gone) XtC4UaLL [:xtc4uall] 2011-06-28 16:19:57 PDT
Hmm, this sounds like Bug 666985/Bug 667632, no?
Bug 666604 is about to fix those (hopefully pushed for Resolution in Time for Firefox 6).
Comment 8 Boris Zbarsky [:bz] (TPAC) 2011-06-29 07:27:54 PDT
*** Bug 666674 has been marked as a duplicate of this bug. ***
Comment 9 Boris Zbarsky [:bz] (TPAC) 2011-07-01 08:36:03 PDT
Fixed by bug 666604.
Comment 10 Thomas Ahlblom 2011-07-13 08:23:32 PDT
*** Bug 671262 has been marked as a duplicate of this bug. ***
Comment 11 Thomas Ahlblom 2011-07-13 08:25:03 PDT
*** Bug 670818 has been marked as a duplicate of this bug. ***
Comment 12 sudeep ghimire 2011-07-13 08:32:33 PDT
so, when do you think this fix will be out???
Comment 13 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-07-13 08:35:48 PDT
This is definitely fixed in Firefox 7, and may be fixed in Firefox 6.

Note You need to log in before you can comment on or make changes to this bug.