Compare commits
2 Commits
3c05647689
...
6408c3db55
Author | SHA1 | Date |
---|---|---|
Matthias Portzel | 6408c3db55 | |
Matthias Portzel | 4c2251a460 |
|
@ -40,11 +40,15 @@
|
|||
const textExtEl = document.getElementById("id_extended_text");
|
||||
|
||||
function updateBoxHeight(box) {
|
||||
// Save scroll position
|
||||
const scrollY = window.scrollY;
|
||||
//style.height doesn't include padding, .scrollHeight does
|
||||
box.style.height = "auto";
|
||||
// Set overflow hidden to ensure scrollbars aren't shown, since they change the width and thus the height
|
||||
box.style.overflow = "hidden";
|
||||
box.style.height = box.scrollHeight + "px";
|
||||
//Restore scroll position
|
||||
window.scrollTo(0, scrollY);
|
||||
}
|
||||
|
||||
// If we're handling maxlength in JS, then having the maxlength attribute is annoying
|
||||
|
@ -84,7 +88,6 @@
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
const mediaInput = document.getElementById("id_media");
|
||||
const mediaAlt = document.getElementById("id_media_alt");
|
||||
const clearCheckbox = document.getElementById("media-clear_id");
|
||||
|
|
|
@ -143,8 +143,9 @@ def post(request):
|
|||
], check=True)
|
||||
os.remove(os.path.join(settings.MEDIA_ROOT, f"{thought.uuid}.m4a")) # Remove the original file
|
||||
thought.media.name = f"{thought.uuid}.aac" # Update the file in the DB
|
||||
else:
|
||||
# We need to make sure that if we remove an image, the alt text is removed with it
|
||||
|
||||
# We need to make sure that if we remove an image, the alt text is removed with it
|
||||
if not thought.media:
|
||||
thought.media_alt = ""
|
||||
|
||||
# Save for real
|
||||
|
|
Loading…
Reference in New Issue