Ajax animates to top of the page when the form has 0 height

Permalink Browser Info Environment
I am currently using a formidable form from within a lightbox pop over window[fancybox links add-on,http://www.concrete5.org/marketplace/addons/fancybox-links/]....

When the form is submitted the form attempts to scroll to the top of the form, which appears to be calculated as 0. [Due to the form being set as display:none;]

I'm sure there is better way to check this? but I have added an extra check and the following resolves the issue for me,

if ($(obj).length > 0 &&  $(obj).height() > 0) {
...
}

Type: Discussion
Status: Resolved
TheRealSean
View Replies:
DeWebmakers replied on at Permalink Reply
DeWebmakers
Hi,

Sorry for the late reply...

Thank you for this. I'll add this to the javascript.

Best,

Corretje

concrete5 Environment Information

.

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.