Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Drag and drop disabled when file upload is disabled #16049

Merged
merged 4 commits into from
Jan 6, 2020

Conversation

dudizilla
Copy link
Contributor

Closes #7816

Drag and Drop now is disabled when the File Upload is disabled.

@@ -586,6 +597,11 @@ export const dropzoneEvents = {

e.stopPropagation();

if (!userCanDrop() || !settings.get('FileUpload_Enabled')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we can add the !settings.get('FileUpload_Enabled') to the userCanDrop instead of testing both

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this check can be done earlier in the event, maybe right after removing the over class from the element

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here: userCanDrop(this._id)

app/ui/client/views/app/room.js Outdated Show resolved Hide resolved
app/ui/client/views/app/room.html Show resolved Hide resolved
ggazzo
ggazzo previously requested changes Dec 26, 2019
},

dragAndDropLabel() {
if (!userCanDrop) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be userCanDrop(this._id)

@@ -586,6 +597,11 @@ export const dropzoneEvents = {

e.stopPropagation();

if (!userCanDrop() || !settings.get('FileUpload_Enabled')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here: userCanDrop(this._id)

@ggazzo ggazzo added this to the 3.0.0 milestone Dec 27, 2019
@ggazzo ggazzo added the ui/ux label Dec 27, 2019
@MartinSchoeler MartinSchoeler dismissed stale reviews from ggazzo and themself January 2, 2020 14:37

Stale review

Copy link
Contributor

@MartinSchoeler MartinSchoeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now

@ggazzo ggazzo closed this Jan 6, 2020
@ggazzo ggazzo reopened this Jan 6, 2020
@ggazzo ggazzo merged commit 1cd20ac into develop Jan 6, 2020
@ggazzo ggazzo deleted the fix-drag-drop branch January 6, 2020 12:15
gabriellsh added a commit that referenced this pull request Jan 9, 2020
…default-favorite-channels

* 'develop' of github.com:RocketChat/Rocket.Chat: (31 commits)
  fix space
  update on mongo, node and caddy
  [NEW] Enforce plain text emails converting from HTML when no text version supplied (#16063)
  [IMPROVE] Status Text form validation (#16121)
  [FIX] auto translate cache (#15768)
  [FIX] Save new password without confirmation (#16060)
  Disable PR Docker image build (#16141)
  [IMPROVE] Set the color of the cancel button on modals to #bdbebf for enhanced  visibiity (#15913)
  [FIX] Break message-attachment text to the next line (#16039)
  [IMPROVE] Remove NRR (#16071)
  Add Cloud Info to translation dictionary (#16122)
  [FIX] Resolving console errors Administrations (#16139)
  [FIX] SafePorts: Ports 80, 8080 & 443 linked to respective protocols (#16108)
  [FIX] Drag and drop disabled when file upload is disabled (#16049)
  [FIX] Video message sent to wrong room (#16113)
  [FIX] "User not found" for direct messages (#16047)
  [BREAK] Removed room counter from sidebar (#16036)
  [FIX] Embedded style when using 'go' command  (#16051)
  [NEW]  Setting Top navbar in embedded mode (#16064)
  [FIX] Thread message icon overlapping text (#16083)
  ...
@sampaiodiego sampaiodiego mentioned this pull request Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drag and drop upload option displayed even when file uploads are disabled
3 participants