From e13b022ea3ad2f0fab32857cc8b612ad570be26e Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 20 Sep 2016 15:54:02 +0200 Subject: [PATCH] Fixed attachments drag & drop --- wcfsetup/install/files/js/WCF.Attachment.js | 6 +++--- wcfsetup/install/files/style/ui/attachment.scss | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.Attachment.js b/wcfsetup/install/files/js/WCF.Attachment.js index dd08d2265c..4a513ad6d4 100644 --- a/wcfsetup/install/files/js/WCF.Attachment.js +++ b/wcfsetup/install/files/js/WCF.Attachment.js @@ -421,9 +421,6 @@ WCF.Attachment.Upload = WCF.Upload.extend({ $li.addClass('uploadFailed'); } - // fix webkit rendering bug - $li.css('display', 'block'); - if (WCF.inArray(uploadID, this._autoInsert)) { this._autoInsert.splice(this._autoInsert.indexOf(uploadID), 1); @@ -501,6 +498,9 @@ WCF.Attachment.Upload = WCF.Upload.extend({ axis: false, items: 'li.sortableAttachment', toleranceElement: null, + start: function (event, ui) { + ui.placeholder[0].style.setProperty('height', ui.helper[0].offsetHeight + 'px', ''); + }, update: function(event, ui) { var $attachmentIDs = [ ]; self._fileListSelector.children('li:not(.uploadFailed)').each(function(index, listItem) { diff --git a/wcfsetup/install/files/style/ui/attachment.scss b/wcfsetup/install/files/style/ui/attachment.scss index e28a2e233e..e127d6dc0b 100644 --- a/wcfsetup/install/files/style/ui/attachment.scss +++ b/wcfsetup/install/files/style/ui/attachment.scss @@ -121,11 +121,12 @@ margin-left: 0 !important; > li { - display: flex !important; /* jquery-ui sortable sometimes sets display:block */ + display: flex; flex: 0 0 100%; margin-bottom: 20px; > .attachmentTinyThumbnail { + border-bottom-width: 0; max-height: 64px; max-width: 64px; } -- 2.20.1