Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

The Reject button cannot be clicked again when closing the Reject screen using ESC.

Steps to reproduce

  • Visit the Suggested edits screen (or an individual suggested edit).
  • Hit the Reject button (a screen appears).
  • Use ESC to close the Reject screen.
  • Hit any Reject button (= not necessarily the just-clicked one).
  • The following message(s) shows up in my console:

Firefox 9:
c is null
Line 1,

Chrome 17
Uncaught TypeError: Cannot read property 'top' of null

The error might be related to the recent jQuery upgrade. I located the error to be at StackExchange.init.createJqueryExtensions:

center: function () {
    var d = this.parent();
    if (d.css("position") === "static") {
        d = d.offsetParent()
    // Apparently, d is not an element, and the following line returns undefined
    var c = d.offset();
    this.css("position", "absolute");
    this.css("top", ($(window).height() - this.height()) / 2
                   + $(window).scrollTop() - + "px");
    this.css("left", ($(window).width() - this.width()) / 2
                    + $(window).scrollLeft() - c.left + "px");
    return this

Side note, this piece code can be optimized by storing $(window) in a temporary variable, since it's called four times.

share|improve this question
up vote 4 down vote accepted

Thanks for the diagnostics, surprisingly this is not a bug related to the jQuery upgrade. It has been there since I initially implemented it.

Fixed now.

The escape key was removing the prototype for the rejection dialog.

share|improve this answer
fyi, not deployed yet – waffles Jan 19 '12 at 4:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .