I noticed that the removeClass() function in drupal.js does also remove spaces between two class names. The attached patch fixes that by replacing the class with leading and or trailing spaces with $1 instead of an empty string (you could also use $2). If $1 is empty, the class that should be removed is at the beginning of the className string, thus it doesn't matter if the trailing space is also removed. Same goes for the end. Only if the class is somehwere in the middle, a space is left to separate the two neighboring classes.

CommentFileSizeAuthor
#1 drupal.js_8.patch567 byteskkaefer
drupal.js_7.patch566 byteskkaefer

Comments

kkaefer’s picture

StatusFileSize
new567 bytes

Sorry, old patch. Here is the new one.

dries’s picture

Status: Needs review » Closed (duplicate)

Tim, your patch looks like a duplicate of #58956. Can you compare both patches?