mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Fixed behaviour's ID selector matching when the ID is inside another context - eg 'body.className #ID'
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99552 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9960c65a5a
commit
01c5e0f084
10
thirdparty/behaviour/behaviour.js
vendored
10
thirdparty/behaviour/behaviour.js
vendored
@ -364,6 +364,16 @@ document.getElementsBySelector = function(selector, parentNode) {
|
|||||||
return new Array();
|
return new Array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// currentContext limitation: for "body.class #Something" selectors.
|
||||||
|
var foundInContext = false;
|
||||||
|
for (var h = 0; h < currentContext.length; h++) {
|
||||||
|
if(currentContext[i] == document || hasAncestor(element, currentContext[i])) {
|
||||||
|
foundInContext = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!foundInContext) return new Array();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Set currentContext to contain just this element
|
// Set currentContext to contain just this element
|
||||||
currentContext = new Array(element);
|
currentContext = new Array(element);
|
||||||
|
Loading…
Reference in New Issue
Block a user