-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Question] Drag & Drop and Context Menu #1679
Comments
Hello, This is very odd - there should be no need to hold for 3-4 seconds and the contextmenu should be canceled - which jstree version are you using and what is the device you have problems with? I just tested on a HTC One m8 (android 5), iPhone 6s and MS 950 - I used the demos on jstree.com. |
You got a thought here @vakata ? |
Some good news @vakata ,
The movement was changed from 50 to 5px, and when this event triggers the context shall hide. Second in the DND-Plugin I changed the settings variable to:
Here you see I also changed threshold_touch to 5. That fixes the problem that if you're not moving your finger 50px the dnd isn't triggered at all. So after this is fixed and the 2 plugins working nice together on my side now I've came across the wholedraw-plugin. On the other hand the context-menu is shown on the wholedraw selection. Any ideas where I could grab in? Thanks |
Thank you for digging in - I will be able to merge the solution in a few hours, but I will probably modify it a bit - threshold_touch should not be very low, as some times just tapping on a phone may trigger a touchstart, touchmove and touchend events (fat fingers). I will run a few tests and see if I can find a more reasonable value (50px is probably too much). As for dragging with wholerow active - check these settings: |
@vakata Thank you, missed it while digging in the API - I gonna give it a try later on. While we're on the DND-Topic: For this i grabbed into the vakata_dnd.helper:
Update: This works truely just if you've enough space on top (like I do on my application)
I've mad here the arrow 5px larger: So maybe the API can be changed a little bit to grab into the helper element to add your own offset? Update: |
Update:
Update2:
The problem with this is that if |
Hi @vakata - we are using jstree for projects that require both drag and drop and context menu to update the folder names. the problem I am having is that in certain instances the context menu does not appear at all, and in other instances the z-index seems to be way too low to actually touch the menu. I gather from the above comments that dnd and context are probably compatible, correct? Where (what selector) should I add z-index:90000 to? Thank you! |
jstree-contextmenu :) |
This icon is bit tricky, is the a way that we can have clear indication like Jq tree. |
Hello!
First of all: A very nice framework and very good to use.
I've stumbled across a small issue and I don't know how to exactly fix it.
I need to enable Drag & Drop aswell as the context-menu on a Smartphone, the problem is, when I want to drag and drop, I need to hold 3-4 seconds until I can drag the node to another node, but then the context menu pops up and its very confusing.
Sometimes the context-menu shows up but I still cant drag & drop the nodes.
Would it be possible to drag and drop the nodes after holding for 200 ms, and when then finger moves the context-menu is canceled, otherwise the context menu shows up after 1 or 2 seconds?
Is there any code part I could grab into, or would I need to grab into the framework myself?
Thanks in advance
Graphefruit
Update:
I've made a small gif (made inside chrome smartphone emulation)
The text was updated successfully, but these errors were encountered: