Fix annoyance: Clicking Remove video scrolls to top
This commit is contained in:
parent
7902f1c3c6
commit
2dd1db166a
|
@ -20,7 +20,7 @@ html(lang="en")
|
||||||
b.caret
|
b.caret
|
||||||
ul.dropdown-menu
|
ul.dropdown-menu
|
||||||
li: a(href="#" onclick="javascript:chatOnly()") Chat Only
|
li: a(href="#" onclick="javascript:chatOnly()") Chat Only
|
||||||
li: a(href="#" onclick="javascript:removeVideo()") Remove Video
|
li: a(href="#" onclick="javascript:removeVideo(event)") Remove Video
|
||||||
mixin navloginlogout(cname)
|
mixin navloginlogout(cname)
|
||||||
section#mainpage
|
section#mainpage
|
||||||
.container
|
.container
|
||||||
|
|
|
@ -1730,7 +1730,7 @@ function handleVideoResize() {
|
||||||
$(window).resize(handleWindowResize);
|
$(window).resize(handleWindowResize);
|
||||||
handleWindowResize();
|
handleWindowResize();
|
||||||
|
|
||||||
function removeVideo() {
|
function removeVideo(event) {
|
||||||
try {
|
try {
|
||||||
PLAYER.setVolume(0);
|
PLAYER.setVolume(0);
|
||||||
if (PLAYER.type === "rv") {
|
if (PLAYER.type === "rv") {
|
||||||
|
@ -1741,6 +1741,7 @@ function removeVideo() {
|
||||||
|
|
||||||
$("#videowrap").remove();
|
$("#videowrap").remove();
|
||||||
$("#chatwrap").removeClass("col-lg-5 col-md-5").addClass("col-md-12");
|
$("#chatwrap").removeClass("col-lg-5 col-md-5").addClass("col-md-12");
|
||||||
|
if (event) event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* channel administration stuff */
|
/* channel administration stuff */
|
||||||
|
|
Loading…
Reference in a new issue