Closed
Bug 676881
Opened 14 years ago
Closed 13 years ago
escape key closes open websocket in Firefox
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 614304
People
(Reporter: surfing+bugzilla, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
Build ID: 20110615151330
Steps to reproduce:
Pressed escape key in Firefox while a websocket connection was open.
Actual results:
The websocket connection was closed. This happened in Firefox 5 on Windows Vista 64 Bit and Windows 7 64 Bit. This did not happen in Chrome or Opera. A test case is attached (index.html). In case this is not a bug I'd love to know how to prevent it anyway (in JavaScript). There already is a similar (but not the same) bug: "614304 - ESC key aborts XMLHttpRequest"
Expected results:
The websocket connection should have stayed open.
Updated•14 years ago
|
Attachment #551078 -
Attachment mime type: text/plain → text/html
Comment 1•14 years ago
|
||
Mozilla/5.0 (X11; Linux x86_64; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
I get this error message in Firefox:
[19:51:02.337] WebSocket is not defined @ https://bug676881.bugzilla.mozilla.org/attachment.cgi?id=551078:9
Something I'm missing? Chromium is a WFM.
Comment 2•14 years ago
|
||
Bug 614304 comment 3 (and below) explains it.
Comment 3•14 years ago
|
||
It's afaik not possible to prevent this.
I found a partial fix for the symptom (attachment 551253 [details], file "partialsymptomfix.html"). It uses jQuery and it prevents the websocket from being closed at least in case the document has the focus.
(In reply to Thomas Ahlblom from comment #1)
> Mozilla/5.0 (X11; Linux x86_64; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
>
> I get this error message in Firefox:
> [19:51:02.337] WebSocket is not defined @
> https://bug676881.bugzilla.mozilla.org/attachment.cgi?id=551078:9
>
> Something I'm missing? Chromium is a WFM.
In Firefox 4 and 5 the websockets implementation is disabled by default due to security reasons and you have to override this to enable websockets. Please read the red box on the bottom of the following website:
https://developer.mozilla.org/en/WebSockets
Comment 7•14 years ago
|
||
Reproduced:
Mozilla/5.0 (X11; Linux x86_64; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
WFM:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30
OS: Windows Vista → All
Hardware: x86_64 → All
Comment 8•13 years ago
|
||
This issue is still present in Firefox 8, where websockets are enabled by default. Is it possible to get this fixed?
Comment 9•13 years ago
|
||
Looks like this is related possible to the things mentioned in this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=614304
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•