Workaround for undefined width/height during drag/drop #641
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hy,
Working with this great JS Library, throw an exception placeholder.attr(..).attr(..).attr(..).attr(..) is not a function.
During a Debug session, I recognize, that during Drag&Drop the Width and Height of Placeholder is "undefined".
I tried to enable the width calculation, but this don't work, because Resizing is not initialized. (Correct)
If I look at this part of code, I understand why it don't work, because width is undefined and the attr(...) function with undefined second parameter returns the value of attribute and not the element.
I don't fully understand, when and why node._temporaryRemoved is true AND width is undefined, because I think if this happens, the placeholder would be initialized with wrong width. But everything works like it should in my environment.
Maybe this PR is only a workaround for another issue. I will further check the function.
Regards,
Stefan
PS: I use jQuery 1.x, because your library will work within another software, which force this version.
It works without problems.