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

getBoundingClientRect #1457

Closed
MaxCrasy opened this issue Feb 25, 2019 · 7 comments
Closed

getBoundingClientRect #1457

MaxCrasy opened this issue Feb 25, 2019 · 7 comments
Labels

Comments

@MaxCrasy
Copy link

MaxCrasy commented Feb 25, 2019

I had a problem using the framework when all the elements were hidden,
So to fix the bug I've edited these function lines

function _getRect(el, container, adjustForTransform) {
if (el === null) { return; }
and
function _ghostIsLast(evt, axis, el) {
targetS2 = elRect === undefined ? 0 : axis === 'vertical' ? elRect.bottom : elRect.right,
targetS1Opp = elRect === undefined ? 0 : axis === 'vertical' ? elRect.left : elRect.top,
targetS2Opp = elRect === undefined ? 0 : axis === 'vertical' ? elRect.right : elRect.bottom,

@owen-m1
Copy link
Member

owen-m1 commented Feb 25, 2019

@MaxCrasy Could you please post the original error message?

@MaxCrasy
Copy link
Author

MaxCrasy commented Feb 26, 2019

that's happen because all elements is hidden
<div class="card" style="display: none;">
capturar1
capturar2

@owen-m1
Copy link
Member

owen-m1 commented Mar 7, 2019

Solved in 7742067

@owen-m1 owen-m1 closed this as completed Mar 7, 2019
@JurrijnP
Copy link

JurrijnP commented Apr 5, 2019

@owen-m1
I have this error in a different place and elements are not hidden.
image

@owen-m1
Copy link
Member

owen-m1 commented Apr 5, 2019

@JurrijnP Please try reproducing using the latest Sortable.js file on master branch, and take a screenshot of the error. I cannot tell which lines those are as you are using the minified file.

@JurrijnP
Copy link

JurrijnP commented Apr 12, 2019

@owen-m1
image

Happens when source is either
<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.js"></script> or
<script src="js/Sortable.js"></script>. (Grabbed Sortable from master branch.)

@owen-m1
Copy link
Member

owen-m1 commented Jun 14, 2019

@JurrijnP Please let me know if it is solved if you build master branch and use that build, otherwise please create a JSBin if you still get the error. I think I solved this recently.

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

3 participants