When using the media dialog, when uploading an image, the image list refreshes itself properly. This was not the case for documents as it was... refreshing the image list too instead of the document list. Also, when uploading a document, it is supposed to be added in the page directly and the media dialog is supposed to close. This feature was broken for the same reason: the iframe system of both tabs which were using the same name. Bug introduced with https://github.com/odoo/odoo/commit/abde8bddf8ec45cf12aab59e95c330321158cfba (even though is was technically wrong for the same reason before). Closes https://github.com/odoo/odoo/pull/28722