aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2023-01-18 00:30:24 +0300
committerRblSb <msrblsb@gmail.com>2023-01-18 00:30:24 +0300
commitb57aca347d4076f995e8849c5cc47c41e9cfd6c2 (patch)
tree021e4b9eb5743fc7f9f9f1fbc992938a8bb7dc97
parent7eafa305e529ddc08d3c656e223529a3129cdf65 (diff)
Fix url panel overflow
-rw-r--r--res/client.js10
-rw-r--r--src/client/Buttons.hx6
2 files changed, 15 insertions, 1 deletions
diff --git a/res/client.js b/res/client.js
index 92ad1c7..32780ac 100644
--- a/res/client.js
+++ b/res/client.js
@@ -712,7 +712,15 @@ client_Buttons.init = function(main) {
var value = mediaUrl.value;
var isRawSingleVideo = value != "" && main.isRawPlayerLink(value) && main.isSingleVideoLink(value);
window.document.querySelector("#mediatitleblock").style.display = isRawSingleVideo ? "" : "none";
- return window.document.querySelector("#subsurlblock").style.display = isRawSingleVideo ? "" : "none";
+ window.document.querySelector("#subsurlblock").style.display = isRawSingleVideo ? "" : "none";
+ var panel = window.document.querySelector("#addfromurl");
+ var oldH = panel.style.height;
+ panel.style.height = "";
+ var newH = client_Buttons.outerHeight(panel) + "px";
+ panel.style.height = oldH;
+ return haxe_Timer.delay(function() {
+ panel.style.height = newH;
+ },0);
};
mediaUrl.onfocus = mediaUrl.oninput;
window.document.querySelector("#insert_template").onclick = function(e) {
diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx
index 071db16..cf1246d 100644
--- a/src/client/Buttons.hx
+++ b/src/client/Buttons.hx
@@ -201,6 +201,12 @@ class Buttons {
&& main.isSingleVideoLink(value);
ge("#mediatitleblock").style.display = isRawSingleVideo ? "" : "none";
ge("#subsurlblock").style.display = isRawSingleVideo ? "" : "none";
+ final panel = ge("#addfromurl");
+ final oldH = panel.style.height; // save for animation
+ panel.style.height = ""; // to calculate height from content
+ final newH = outerHeight(panel) + "px";
+ panel.style.height = oldH;
+ Timer.delay(() -> panel.style.height = newH, 0);
}
mediaUrl.onfocus = mediaUrl.oninput;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage