General > Support

End chat thread on browser close button

<< < (2/2)

faf:

--- Quote from: nirpan on November 22, 2013, 10:41:04 AM ---Indeed it is very very difficult especially when you have to support browsers like IE8 which won't just die already!

--- End quote ---

You don't say!  :D


--- Quote from: nirpan on November 22, 2013, 10:41:04 AM ---I will have a look at the link as well as try out that thread time feature thing and see if it works when the operator sees it.

--- End quote ---

Ok. And please post here your findings. It can be useful for other people with the same problem.  ;)

nirpan:
Hi Faf,

Ha! IE is just so unpredictable in so many sense or maybe I am just shit ;p. So far I have found that closing a chat by closing the chat window works on chrome, firefox and safari when I use this code posted on the other forum:

--- Code: ---// Fix Chat Leaves
EventHelper.register(window, 'onbeforeunload', function() {   
    Chat.threadUpdater.closeThread();
});
--- End code ---

But this cause the chat thread to close every time a link is clicked on IE8. Now I tried adding some JS so that it won't close when a link is clicked (by setting the onbeforeunload to null) but IE8 does the exact opposite of closing the chat thread when the link is clicked; it seems to keep the onbeforeunload value as null.

Now the whole reason to do this was because many operators seem to never click the 'close chat' link within the chat window and just close the browser 'X' button. And they get confused as to why the thread is still there. For now my solution is to simply display the warning popup asking them to use the close chat button in the chat window if they want to end the conversation.

The other issue with the chat thread still being listed on the visitors page, I tested by setting the thread lifetime to 60 seconds and then created a scenario where an client starts a conversation, the operator acknowledges it, after which the client abruptly closes the chat using browser close window. The operator is notified after 60 seconds but the chat thread is still listed in the visitors page until the operator closes it using the close chat. I am not sure if this is how it's supposed to be as I had expected the chat thread to be closed and not appear on the visitors page.

Thanks for your time.

faf:

--- Quote from: nirpan on November 25, 2013, 11:07:21 PM ---The other issue with the chat thread still being listed on the visitors page, I tested by setting the thread lifetime to 60 seconds and then created a scenario where an client starts a conversation, the operator acknowledges it, after which the client abruptly closes the chat using browser close window. The operator is notified after 60 seconds but the chat thread is still listed in the visitors page until the operator closes it using the close chat. I am not sure if this is how it's supposed to be as I had expected the chat thread to be closed and not appear on the visitors page.

--- End quote ---

Actually, yes, it's supposed to be so. Mibew Messenger 1.6.x closes only old threads that was seen by an operator. It's the limitation of the application design.

Navigation

[0] Message Index

[*] Previous page

Go to full version