1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed 'Click to expand...' not being removed

Discussion in 'Resolved Bug Reports' started by Jon W, Sep 4, 2013.

  1. Jon W

    Jon W Well-Known Member

    Although this doesn't really affect anything (since there is sufficient CSS in place to hide the affected text), I noticed that there is some completely redundant code in the xenforo.js file:
    Code:
                $(document).on('click', '.bbCodeQuote .quoteContainer .quoteExpand', function(e) {
                    $(this).remove('quoteCut');
                    $(this).closest('.quoteContainer').toggleClass('expanded');
                });
    should be:
    Code:
                $(document).on('click', '.bbCodeQuote .quoteContainer .quoteExpand', function(e) {
                    $(this).closest('.quoteContainer').toggleClass('expanded');
                    $(this).remove('.quoteCut');
                });
    or simply:
    Code:
                $(document).on('click', '.bbCodeQuote .quoteContainer .quoteExpand', function(e) {
                    $(this).remove('quoteCut');
                    $(this).closest('.quoteContainer').toggleClass('expanded');
                });
    At the moment the second line of code does absolutely nothing.

    Edit: just noticed that the remove line needs to come after the toggleClass line.
     
    Last edited: Sep 4, 2013
  2. Mike

    Mike XenForo Developer Staff Member

    I'll remove the line to keep the behavior consistent.
     

Share This Page