Closed Bug 762877 Opened 12 years ago Closed 2 years ago

Javascript .ready() not working correctly.

Categories

(Core :: DOM: Core & HTML, defect, P5)

12 Branch
x86_64
Windows 7
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: dbelow, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0
Build ID: 20120420145725

Steps to reproduce:

I have a MVC4 application with two views.
View 1: text only.
View 2: a button.

On button click it signals the View 1 to reload (and show new content). 
This is done per LongPolling. The Poll from View 1 is started on $(this).ready(...).

If i open View 1 in a new window, it works perfectly fine. If i open View 1 in a new tab, there are two possible scenarios.

1) I click View 2 and press the button. View 1 will then reload.
2) I click View 1 and then View 2 and press the button. View 1 will receive the message sent by View 2, but it won't reload. 

(I tried $(document).ready(...) at first, but then it didn't work in tabs at all (only in new windows), $(this).ready(...) or $(function() ...) are working in scenario 1 just fine)

I also opened a stackoverflow thread: http://stackoverflow.com/questions/10896397/jquery-browser-difference
, because i do not have this problem, if i try it with Chrome or InternetExplorer.


Actual results:

The callback function of the AJAX request was not called, after the data received (checked with FireBug), if i looked at View 1, before clicking the button in View 2.

If i didn't look at View 1 before clicking the button, the callback will be called just fine.


Expected results:

The callback function should have been called, causing the page to reload.
Component: Untriaged → General
This is not a Firefox:General issue, it's not even a Firefox product issue....

A public testcase would help.
Component: General → DOM
Product: Firefox → Core
QA Contact: untriaged → general
Testcase, please.

(I have no idea what MVC4 is, nor what jQuery's ready() might do)
ready() should in theory add a DOMContentLoaded listener.
Will make a public testcase in the next few days.
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.