mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
FIX: Remove unnecessary audio/video parent element load (#10511)
Meta report: https://meta.discourse.org/t/sending-many-requests-for-video-audio-upload-while-editing-post/161487 When typing in the composer we are sending a lot of unnecessary load() requests for the video/audio elements. This line was added months ago before we improved previewing/video thumbnails, which have improved things, so it is no longer required. After removing this line everything still works and no more additional requests are sent.
This commit is contained in:
parent
62f4fc728d
commit
9022e4516f
@ -147,10 +147,6 @@ function _loadCachedShortUrls(uploadElements, siteSettings, opts) {
|
||||
|
||||
upload.src = url;
|
||||
|
||||
// this is necessary, otherwise because of the src change the
|
||||
// video/audio just doesn't bother loading!
|
||||
upload.parentElement.load();
|
||||
|
||||
// set the url and text for the <a> tag within the <video/audio> tag
|
||||
const link = upload.parentElement.querySelector("a");
|
||||
if (link) {
|
||||
|
Loading…
Reference in New Issue
Block a user