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

When 'disableNesting' is set, those elements still have drop zones #47

Open
Fauntleroy opened this issue Aug 29, 2012 · 12 comments
Open
Labels

Comments

@Fauntleroy
Copy link

When I set disableNesting: 'file', it properly disables the specified class, but it doesn't disable the drop zone, leading to some very confusing user experience. Is there any way to disable a certain type of element AND disable its drop zone?

@codeclown
Copy link

I came here to post this same exact issue. Upvote!

@mjsarfatti
Copy link
Owner

The placeholder is still shown because you may want to style it, say, with a red background (see my demo) to hint the user that he can't drop there.

If you want to disable the drop zone you could try setting the placeholder height to 0... Anyway this feature request has been coming up a few times recently, a future update might include an option for disabling the drop zone altogether, but I can't say when.

@dustinbolton
Copy link

I came here to post this as well.

EDIT #1: I was able to emulate this exact behavior by setting "display: none;" on the error class. This completely hid the dropzone and removed its spot. This is exactly what I wanted.

disableNesting: 'notemenu_error'

 .notemenu_error {
    display: none;
 } 

EDIT #2: There is still a small problem with this method for nested items. It means when trying to sort and drop under an item nested under another item, when you are to the right of the tabSize value then you have no dropzone. The correct behaviour I believe would be for the dropzone within the tabSize area to extend fully to the right as if you were dropping below the above item and not trying to drop nested inside it. Essentially when an item has nesting disabled, I do not want it to detect a drop zone below it (even if I hide it with my CSS it still detects it) so that the dropzone from the parent can still appear there like it would normally if the nonest item was not existing. I hope that made sense; it's a bit difficult to explain. If you do add the feature to disable the drop zone please consider making it function as I describe if possible. Will feed hungry programmers for fix. :D

Thank you very very much for this great tool.

@mjsarfatti
Copy link
Owner

Hi Dustin,
I got your point. It makes sense, it will definitely be part of version 2.0. Hopefully soon, by the end of next week.

@gihrig
Copy link

gihrig commented Oct 26, 2012

Thank you Manuele, I too would make use of this feature. I'm watching for version 2.0.

@scriby
Copy link

scriby commented Nov 8, 2012

+1

@mjsarfatti
Copy link
Owner

@scriby
Copy link

scriby commented Nov 8, 2012

I noticed this and have it integrated and working.

Thanks!

@mjsarfatti
Copy link
Owner

Great :)

@dustinbolton
Copy link

Seems to work perfectly in the 2.0 alpha so far in my testing. I'll keep trying things out and customizing. Donating for the awesome work! :) Thank you.

@dustinbolton
Copy link

Discovered a single 2.0 alpha "glitch" that is similar / possibly related. Reproducible in demo for 2.0alpha: http://mjsarfatti.com/sandbox/nestedSortable/

Reproduction steps:

  1. Pick up Item 2.
  2. Hover it over Item 1 to expand it.
  3. Hover it between Item 1 and Sub Item 1.1. (placeholder is now on same level and above Sub Item 1.1.
  4. Move the mouse up so that you are hovering over the middle of Item 1. (the placeholder should stay in the same place).
  5. Move the mouse back down to where the placeholder currently is. (the placeholder will now drop to the BOTTOM of this section rather than staying put).

It seems to be the issue happens whenever exiting the ol and re-entering it via the top. I played around with CSS a bit to see if I could work around the issue that way but no luck so far.

@mjsarfatti
Copy link
Owner

Sorry for replying late. Thanks for the bug report, will look into that!
It's a minor glitch, so it won't get high priority...

2012/12/12 Dustin Bolton [email protected]

Discovered a single 2.0 alpha "glitch" that is similar / possibly related.
Reproducible in demo for 2.0alpha:
http://mjsarfatti.com/sandbox/nestedSortable/

Reproduction steps:

  1. Pick up Item 2.
  2. Hover it over Item 1 to expand it.
  3. Hover it between Item 1 and Sub Item 1.1. (placeholder is now on same
    level and above Sub Item 1.1.
  4. Move the mouse up so that you are hovering over the middle of Item 1.
    (the placeholder should stay in the same place).
  5. Move the mouse back down to where the placeholder currently is. (the
    placeholder will now drop to the BOTTOM of this section rather than staying
    put).

It seems to be the issue happens whenever exiting the ol and re-entering
it via the top. I played around with CSS a bit to see if I could work
around the issue that way but no luck so far.


Reply to this email directly or view it on GitHubhttps://github.com//issues/47#issuecomment-11282391.

hmhofman pushed a commit to hmhofman/nestedSortable that referenced this issue Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants