Ticket #2408 (new defect)

Opened 18 months ago

Last modified 7 days ago

Escape key in browser kills cometd connection

Reported by: will@… Owned by: anonymous
Priority: normal Milestone: future
Component: DojoX Cometd Version: 0.4.1
Severity: major Keywords: cometd comet
Cc:

Description (last modified by alex) (diff)

On pressing the escape key in Firefox 2 (may be apparent in other browsers also) the comet connection to the server is lost, and it does not reconnect. The connection type used was the long polling HTTP POST.

Using javascript evt.preventDefault() when escape is pressed does not prevent this action... user must explicitly recall cometd.init() to reinitialize the connection

Change History

Changed 18 months ago by guest

If you capture the escape keydown event, and return false, this fixes the problem. This event should probably be captured in the cometd code.

Changed 18 months ago by alex

  • milestone changed from 0.4.2 to 0.9

Changed 12 months ago by alex

  • milestone changed from 0.9 to 1.1

Changed 12 months ago by alex

  • status changed from new to assigned

Changed 5 months ago by dylan

  • milestone changed from 1.1 to 1.2

mass move of editor issues to 1.2.

Changed 7 weeks ago by alex

  • component changed from Events to DojoX Cometd
  • description modified (diff)

Changed 3 weeks ago by dylan

  • status changed from assigned to new
  • owner changed from alex to anonymous
  • milestone changed from 1.2 to future

Changed 7 days ago by joscha

For the lazy ones:

dojo.connect(document, "onkeypress", function(e) {
    var key = e.keyCode || e.charCode;
    if (key == dojo.keys.ESCAPE) {
        return false;
    }
});
Note: See TracTickets for help on using tickets.