Return don't send message on IE11

All around Zimbra Chat, give us your feedback, questions and ideas
Weastbug
Posts: 3
Joined: Sat Sep 13, 2014 2:21 am

Return don't send message on IE11

Postby Weastbug » Thu Dec 21, 2017 10:07 am

Hi,

On Internet Explorer 11 we are not able to send message, when we hit the enter key it's make a new line and don't send it.


Ubuntu 14.04.5
Zimbra 8.8.5


Thanks in advence
Regards, Weast.


Weastbug
Posts: 3
Joined: Sat Sep 13, 2014 2:21 am

Re: Return don't send message on IE11

Postby Weastbug » Thu Dec 21, 2017 5:05 pm

Temporary solution working for me:

File: com_zextras_chat_open_bundle.js

Code: Select all

    RoomWindow.prototype.keyboardListener = function (ev) {
        this.stopBlink();
        var event = new DwtKeyEvent_1.DwtKeyEvent();
        event.setFromDhtmlEvent(DwtUiEvent_1.DwtUiEvent.getEvent(ev));
        var writingValue = WritingStatusEvent_1.WritingStatusEvent.RESET;
        if (DwtKeyEvent_1.DwtKeyEvent.getCharCode(event) === DwtKeyEvent_1.DwtKeyEvent.KEY_ENTER && !event.shiftKey) {
            var currentInputPosition = this.getCurrentInputPosition(this.mInputField.getInputElement());
            var realMessage = this.mInputField.getInputElement().value;
            var message = realMessage;
            if (bowser_1.Bowser.msie) {
                if (realMessage.substring(currentInputPosition, currentInputPosition + 2) === "\r\n") {
                    message = "" + realMessage.substring(0, currentInputPosition) + realMessage.substring(currentInputPosition + 2);
                }
                else {
// ADD
                    message = "" + realMessage.substring(0, currentInputPosition) + realMessage.substring(currentInputPosition + 2);
//                    return;                   
                }
            }
            else {
                if (realMessage.substring(currentInputPosition - 1, currentInputPosition) === "\n") {
                    message = "" + realMessage.substring(0, currentInputPosition - 1) + realMessage.substring(currentInputPosition);
                }
                else {
                    return;
                }
            }


Return to “Zimbra Chat”

Who is online

Users browsing this forum: No registered users and 5 guests