Updated to Bootstrap 3.4 and now dropdown's have stopped working. This happens with both Jquery 1.9 and 1.10.
The error is: Error: Syntax error, unrecognized expression: #
It appears to be stemming from this code in dropdown.js:
function getParent($this) {
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
var $parent = selector && $(document).find(selector)
return $parent && $parent.length ? $parent : $this.parent()
}
Comments
Comment #2
rschwab commentedThis might actually be a bug in Bootstrap 3.4. Maybe the documentation just needs to be updated? See https://github.com/twbs/bootstrap/issues/27869
Comment #3
markhalliwellThis is partially a framework issue (because they really should handle hashes properly), but was more of an issue introduced with higher jQuery versions. This was already "fixed" upstream in 8.x-3.x; needs a backport.
Comment #5
rschwab commentedOver at GitHub Johann-S suggested this change in dropdown.js:
From:
var $parent = selector && $(document).find(selector)To:
var $parent = selector !== '#' && $(document).find(selector)I've tested and it works, but I'm not familiar enough with the underlying XSS issue to understand if its preferable to the patch above, or not.
At any rate thanks for the very fast response, and the great theme!
Comment #7
afsolano commentedThe patch isn't working for me. With theme version 3.23 and jquery 2.1 the error continues to happen.