Skip to main content

Bug Tracker

Side navigation

#8210 closed bug (invalid)

Opened February 08, 2011 12:59PM UTC

Closed February 08, 2011 03:40PM UTC

Comment form not appearing

Reported by: kmac@nc-f.org Owned by: kmac@nc-f.org
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5
Keywords: Cc:
Blocked by: Blocking:
Description

We have a comment form on our site (amren.com). As a fig leaf, we asked that visitors click an "Agree" button to signify that they understand the rules for posting a comment. Clicking the "Agree" button reveals the comment form. The code reads:

<script type="text/javascript" charset="utf-8">
var jQuery;
(function ($) {
// show the comment form
    $('#showButton').click(function () {
        $('#v-form').toggle();
        if ($('#v-form').is(':visible')) {
            $(this).val('No thanks');
            var $body = $('body'), footerPosition = $('#footer').position(), scrollPosition = $body.scrollTop() + footerPosition.top;
            $('html, body').animate({scrollTop: scrollPosition}, 5000);
        } else {
            $(this).val('I agree');
        }
    });
}(jQuery));
</script>

I recently switched from jQuery 1.4.4 from the Google CDN to jQuery 1.5.0 from your CDN. We have received some complaints that clicking the "Agree" button does not reveal the comment form.

So far, there are two common user agent strings for visitors reporting this problem:

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729

To be honest, I had a bit of trouble getting this "reveal" code working in the first place, but it has been working for months now. It works in my browsers, so I suspect this bug is specific to certain combinations of hardware and software, but I thought you might like to know.

Thanks!

Attachments (0)
Change History (4)

Changed February 08, 2011 01:32PM UTC by jitter comment:1

description: We have a comment form on our site (amren.com). As a fig leaf, we asked that visitors click an "Agree" button to signify that they understand the rules for posting a comment. Clicking the "Agree" button reveals the comment form. The code reads: \ \ <script type="text/javascript" charset="utf-8"> \ var jQuery; \ (function ($) { \ // show the comment form \ $('#showButton').click(function () { \ $('#v-form').toggle(); \ if ($('#v-form').is(':visible')) { \ $(this).val('No thanks'); \ var $body = $('body'), footerPosition = $('#footer').position(), scrollPosition = $body.scrollTop() + footerPosition.top; \ $('html, body').animate({scrollTop: scrollPosition}, 5000); \ } else { \ $(this).val('I agree'); \ } \ }); \ }(jQuery)); \ </script> \ \ I recently switched from jQuery 1.4.4 from the Google CDN to jQuery 1.5.0 from your CDN. We have received some complaints that clicking the "Agree" button does not reveal the comment form. \ \ So far, there are two common user agent strings for visitors reporting this problem: \ \ Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729 \ \ Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729 \ \ To be honest, I had a bit of trouble getting this "reveal" code working in the first place, but it has been working for months now. It works in my browsers, so I suspect this bug is specific to certain combinations of hardware and software, but I thought you might like to know. \ \ Thanks!We have a comment form on our site (amren.com). As a fig leaf, we asked that visitors click an "Agree" button to signify that they understand the rules for posting a comment. Clicking the "Agree" button reveals the comment form. The code reads: \ {{{ \ <script type="text/javascript" charset="utf-8"> \ var jQuery; \ (function ($) { \ // show the comment form \ $('#showButton').click(function () { \ $('#v-form').toggle(); \ if ($('#v-form').is(':visible')) { \ $(this).val('No thanks'); \ var $body = $('body'), footerPosition = $('#footer').position(), scrollPosition = $body.scrollTop() + footerPosition.top; \ $('html, body').animate({scrollTop: scrollPosition}, 5000); \ } else { \ $(this).val('I agree'); \ } \ }); \ }(jQuery)); \ </script> \ }}} \ I recently switched from jQuery 1.4.4 from the Google CDN to jQuery 1.5.0 from your CDN. We have received some complaints that clicking the "Agree" button does not reveal the comment form. \ \ So far, there are two common user agent strings for visitors reporting this problem: \ \ Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729 \ \ Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729 \ \ To be honest, I had a bit of trouble getting this "reveal" code working in the first place, but it has been working for months now. It works in my browsers, so I suspect this bug is specific to certain combinations of hardware and software, but I thought you might like to know. \ \ Thanks!
owner: → kmac@nc-f.org
status: newpending

Thanks for taking the time to contribute to the jQuery project by writing a bug report.

I don't think this has got anything to do with hardware at most it's a browser specific bug. But as it's kinda difficult and time consuming to figure out what could be cause for this on a full-blown page we ask you to please submit a reduced test case, which reproduces the issue you are experiencing, on http://jsfiddle.net.

So that we can investigate this issue further. Also make sure to read the link given below, in order to provide a most useful bug report.


How to report bugs

Changed February 08, 2011 03:03PM UTC by anonymous comment:2

I've never done this before, but try this:

http://jsfiddle.net/9bYbk/

Changed February 08, 2011 03:06PM UTC by kmac@nc-f.org comment:3

status: pendingnew

OK, it may be an issue with the way I'm invoking the jQuery code. I just changed "(function ($)" to "$(document).ready(function()" and it now seems to be working, even with 1.5.0.

Looks as though this might be my coding error. Sorry.

Changed February 08, 2011 03:40PM UTC by addyosmani comment:4

resolution: → invalid
status: newclosed

Closing as the original ticket submitter has confirmed the issue was on their end rather than with core itself.