Enter key (auto-submit chat message) broken in v4

Last post 11-10-2007, 12:27 AM by stimpy77. 2 replies.
Sort Posts: Previous Next
  •  11-09-2007, 11:21 PM 34953

    Enter key (auto-submit chat message) broken in v4

    In at least one browser (Firefox or IE, don't remember which, but I think it was Firefox), sometimes when the Enter key is pressed, a line break occurs rather than a message transmission. Actually this happened frequently.
     
    I fixed this on my end by: Changing the evaluation of event.keyCode from string to int, and evaluating both 10 and 13 and not just 13.
     
    Revision here:
     
    Note that I represent a customer of CuteSoft, I'm not an employee of CuteSoft; use my tweak at your own risk.
     
    Jon
     
  •  11-10-2007, 12:12 AM 34958 in reply to 34953

    Re: Enter key (auto-submit chat message) broken in v4

    Sometimes the input box don't fire the ENTER key event.
    I just thought that is a bug of IE.
    if the 10 key code can avoid that problem .
    I will update it.
     
    Thanks.
     
    Regards , Terry .
  •  11-10-2007, 12:27 AM 34959 in reply to 34953

    Re: Enter key (auto-submit chat message) broken in v4

    Yeah plus it was evaluating keyCode == '13' rather than keyCode == 13 (string vs. integer). May or may not matter but I come from a C# background where it would matter a LOT.
     
     
    Meanwhile, even with the fix it still proves to be broken if you select an avatar. When you finish selecting an avatar (or cancel), you have to click Submit manually or you just get line break in the message textbox.
View as RSS news feed in XML