Unable to drop files on void nodes
See original GitHub issueDo 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:
- 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. - 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:
- Created 6 years ago
- Comments:9 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sounds good, I’ll take a shot at it! This would also remove the need for checking for void nodes specifically.
@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 toisInEditor
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!