Fix channel password prompt
Add zin param to allow explicit z-index in JS generated dialog boxes. Give needpass dialog explicit z-index
This commit is contained in:
parent
47bb3e47a2
commit
a53f65a1d5
|
@ -139,7 +139,7 @@ Callbacks = {
|
||||||
.css("margin-top", "5px")
|
.css("margin-top", "5px")
|
||||||
.text("Submit")
|
.text("Submit")
|
||||||
.appendTo(div);
|
.appendTo(div);
|
||||||
var parent = chatDialog(div);
|
var parent = chatDialog(div, '9999');
|
||||||
parent.attr("id", "needpw");
|
parent.attr("id", "needpw");
|
||||||
var sendpw = function () {
|
var sendpw = function () {
|
||||||
socket.emit("channelPassword", pwbox.val());
|
socket.emit("channelPassword", pwbox.val());
|
||||||
|
|
|
@ -2097,11 +2097,20 @@ function waitUntilDefined(obj, key, fn) {
|
||||||
fn();
|
fn();
|
||||||
}
|
}
|
||||||
|
|
||||||
function chatDialog(div) {
|
/*
|
||||||
|
God I hate supporting IE11
|
||||||
|
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters
|
||||||
|
https://caniuse.com/#search=default%20function
|
||||||
|
|
||||||
|
This would be the ideal:
|
||||||
|
function chatDialog(div, zin = "auto") {
|
||||||
|
*/
|
||||||
|
function chatDialog(div, zin) {
|
||||||
|
if(!zin){ zin = 'auto'; }
|
||||||
var parent = $("<div/>").addClass("profile-box")
|
var parent = $("<div/>").addClass("profile-box")
|
||||||
.css({
|
.css({
|
||||||
padding: "10px",
|
padding: "10px",
|
||||||
"z-index": "auto",
|
"z-index": zin,
|
||||||
position: "absolute"
|
position: "absolute"
|
||||||
})
|
})
|
||||||
.appendTo($("#chatwrap"));
|
.appendTo($("#chatwrap"));
|
||||||
|
|
Loading…
Reference in a new issue