From: Alexander Ebert Date: Tue, 20 Sep 2016 13:54:02 +0000 (+0200) Subject: Fixed attachments drag & drop X-Git-Tag: 3.0.0_Beta_1~73 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e13b022ea3ad2f0fab32857cc8b612ad570be26e;p=GitHub%2FWoltLab%2FWCF.git Fixed attachments drag & drop --- 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; }