mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 10:12:00 +08:00
fix(uploads): Don't allow dragging of uploading images (Fixes #366)
This commit is contained in:
parent
72a624fe78
commit
55e4dd14b9
1 changed files with 6 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
path = require 'path'
|
||||
React = require 'react'
|
||||
FileUpload = require './file-upload'
|
||||
{RetinaImg, DraggableImg} = require 'nylas-component-kit'
|
||||
{RetinaImg} = require 'nylas-component-kit'
|
||||
|
||||
class ImageFileUpload extends FileUpload
|
||||
@displayName: 'ImageFileUpload'
|
||||
|
@ -12,7 +12,7 @@ class ImageFileUpload extends FileUpload
|
|||
render: =>
|
||||
<div className="file-wrap file-image-wrap file-upload">
|
||||
<div className="file-action-icon" onClick={@_onClickRemove}>
|
||||
<RetinaImg name="image-cancel-button.png"/>
|
||||
<RetinaImg name="image-cancel-button.png" mode={RetinaImg.Mode.ContentPreserve}/>
|
||||
</div>
|
||||
|
||||
<div className="file-preview">
|
||||
|
@ -20,7 +20,7 @@ class ImageFileUpload extends FileUpload
|
|||
<div className="file-name">{@props.uploadData.fileName}</div>
|
||||
</div>
|
||||
|
||||
<DraggableImg src={@props.uploadData.filePath} />
|
||||
<img src={@props.uploadData.filePath} onDragStart={@_onDragStart}/>
|
||||
</div>
|
||||
|
||||
<div className={"progress-bar-wrap state-#{@props.uploadData.state}"}>
|
||||
|
@ -28,4 +28,7 @@ class ImageFileUpload extends FileUpload
|
|||
</div>
|
||||
</div>
|
||||
|
||||
_onDragStart: (event) ->
|
||||
event.preventDefault()
|
||||
|
||||
module.exports = ImageFileUpload
|
||||
|
|
Loading…
Reference in a new issue