mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-08 03:02:03 +01:00
Fix for disappearing chat
This commit is contained in:
parent
d9686c7646
commit
4287cc283a
1 changed files with 11 additions and 9 deletions
|
@ -20,18 +20,24 @@ var chat = (function()
|
||||||
var isAndroid = ua.indexOf("android") > -1;
|
var isAndroid = ua.indexOf("android") > -1;
|
||||||
var isMobileSafari = ua.indexOf("mobile") > -1;
|
var isMobileSafari = ua.indexOf("mobile") > -1;
|
||||||
var bottomMargin = "0px";
|
var bottomMargin = "0px";
|
||||||
|
var sDuration = 500;
|
||||||
|
var hDuration = 750;
|
||||||
var chatMentions = 0;
|
var chatMentions = 0;
|
||||||
var title = document.title;
|
var title = document.title;
|
||||||
|
if (isAndroid || isMobileSafari){
|
||||||
|
sDuration = 0;
|
||||||
|
hDuration = 0;
|
||||||
|
}
|
||||||
var self = {
|
var self = {
|
||||||
show: function ()
|
show: function ()
|
||||||
{
|
{
|
||||||
$("#chaticon").hide("slide", {
|
$("#chaticon").hide("slide", {
|
||||||
direction: "down"
|
direction: "down"
|
||||||
}, 500, function ()
|
}, hDuration, function ()
|
||||||
{
|
{
|
||||||
$("#chatbox").show("slide", {
|
$("#chatbox").show("slide", {
|
||||||
direction: "down"
|
direction: "down"
|
||||||
}, 750, self.scrollDown);
|
}, sDuration, self.scrollDown);
|
||||||
$("#chatbox").resizable(
|
$("#chatbox").resizable(
|
||||||
{
|
{
|
||||||
handles: 'nw',
|
handles: 'nw',
|
||||||
|
@ -60,14 +66,10 @@ var chat = (function()
|
||||||
hide: function ()
|
hide: function ()
|
||||||
{
|
{
|
||||||
$("#chatcounter").text("0");
|
$("#chatcounter").text("0");
|
||||||
if(isAndroid || isMobileSafari) {
|
$("#chatbox").hide("slide", { direction: "down" }, sDuration, function()
|
||||||
$("#chatbox").toggle();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$("#chatbox").toggle("slide", { direction: "down" }, 625);
|
$("#chaticon").show("slide", { direction: "down" }, hDuration);
|
||||||
}
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
scrollDown: function()
|
scrollDown: function()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue