question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to drop files on void nodes

See original GitHub issue

Do you want to request a feature or report a bug?

Bug

What’s the current behavior?

Currently, when you drop a file on a void node, nothing happens. This is because the code here returns early in the onDrop function in content. It seems like the isInEditor function was designed to return false on void nodes or their content.

What’s the expected behavior?

We should be able to drop a file on the void node, and have the event continue as on a non-void node.

Next Steps

I’m not sure though if:

  1. We want to add a function testing if the drop is on a void node to modify this condition OR modify isInEditor to NOT return false on void nodes or their content.
  2. And if so what is the most reliable way to test if a DOM element is a child of a void node.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
oyeanujcommented, Aug 16, 2017

Sounds good, I’ll take a shot at it! This would also remove the need for checking for void nodes specifically.

1reaction
ianstormtaylorcommented, Aug 15, 2017

@oyeanuj good find. I think an easy way to solve this might be to make it so that we have two different methods to use:

  • isInEditor which is the current one without the editable check.
  • isEditableInEditor which calls to isInEditor and then adds the editable check too.

And change all the current use cases to use the new one, with the onDrop one not caring about whether the node is editable.

Are you down to make that change? Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Issues - Void Linux Handbook
"Not Found". A "Not Found" error, such as: ERROR: [reposync] failed to fetch file `https://repo-default.
Read more >
node asserts in node_contextify.cc:631 Assertion `args[1 ...
i got the error as npm[6700]: c:\ws\src\node_contextify.cc:626: Assertion `args[1]->IsString()' failed. problem solved. note: i checked my node ...
Read more >
Cannot convert from 'void *' to 'node *' - Stack Overflow
Cannot convert void* to NODE*. The question is tagged with C and the code written here is also valid C , but invalid...
Read more >
Delete a given node in Linked List under given constraints
Given a Singly Linked List, write a function to delete a given node. Your function must follow following constraints:
Read more >
How to Delete Files and Directories in Java - DevQA.io
To delete a file in Java, we can use the delete() method from Files ... public class DeleteFile { public static void main(String[]...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found