diff --git a/bower.json b/bower.json index b17769e8..3c4dd43e 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating", - "version": "1.1.2", + "version": "1.1.3", "description": "An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.", "keywords": [ "aurelia", diff --git a/dist/amd/aurelia-templating.js b/dist/amd/aurelia-templating.js index 13c13aa8..77147d14 100644 --- a/dist/amd/aurelia-templating.js +++ b/dist/amd/aurelia-templating.js @@ -2469,7 +2469,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli var value = element.getAttribute('class'); var auTargetID = getNextAUTargetID(); - element.setAttribute('class', value ? value += ' au-target' : 'au-target'); + element.setAttribute('class', value ? value + ' au-target' : 'au-target'); element.setAttribute('au-target-id', auTargetID); return auTargetID; @@ -2538,7 +2538,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli if (targetId) { var ins = instructions[targetId]; - if (ins.shadowSlot || ins.lifting) { + if (ins.shadowSlot || ins.lifting || ins.elementInstruction !== null && !ins.elementInstruction.anchorIsContainer) { content.insertBefore(_aureliaPal.DOM.createComment('view'), firstChild); } } diff --git a/dist/aurelia-templating.js b/dist/aurelia-templating.js index 42550a2b..200540fe 100644 --- a/dist/aurelia-templating.js +++ b/dist/aurelia-templating.js @@ -3132,7 +3132,7 @@ function makeIntoInstructionTarget(element) { let value = element.getAttribute('class'); let auTargetID = getNextAUTargetID(); - element.setAttribute('class', (value ? value += ' au-target' : 'au-target')); + element.setAttribute('class', (value ? value + ' au-target' : 'au-target')); element.setAttribute('au-target-id', auTargetID); return auTargetID; @@ -3215,7 +3215,7 @@ export class ViewCompiler { if (targetId) { let ins = instructions[targetId]; - if (ins.shadowSlot || ins.lifting) { + if (ins.shadowSlot || ins.lifting || (ins.elementInstruction !== null && !ins.elementInstruction.anchorIsContainer)) { content.insertBefore(DOM.createComment('view'), firstChild); } } diff --git a/dist/commonjs/aurelia-templating.js b/dist/commonjs/aurelia-templating.js index ce579e3b..971c5fac 100644 --- a/dist/commonjs/aurelia-templating.js +++ b/dist/commonjs/aurelia-templating.js @@ -2450,7 +2450,7 @@ function makeIntoInstructionTarget(element) { var value = element.getAttribute('class'); var auTargetID = getNextAUTargetID(); - element.setAttribute('class', value ? value += ' au-target' : 'au-target'); + element.setAttribute('class', value ? value + ' au-target' : 'au-target'); element.setAttribute('au-target-id', auTargetID); return auTargetID; @@ -2519,7 +2519,7 @@ var ViewCompiler = exports.ViewCompiler = (_dec7 = (0, _aureliaDependencyInjecti if (targetId) { var ins = instructions[targetId]; - if (ins.shadowSlot || ins.lifting) { + if (ins.shadowSlot || ins.lifting || ins.elementInstruction !== null && !ins.elementInstruction.anchorIsContainer) { content.insertBefore(_aureliaPal.DOM.createComment('view'), firstChild); } } diff --git a/dist/es2015/aurelia-templating.js b/dist/es2015/aurelia-templating.js index 52f5e4cd..5ea68533 100644 --- a/dist/es2015/aurelia-templating.js +++ b/dist/es2015/aurelia-templating.js @@ -2228,7 +2228,7 @@ function makeIntoInstructionTarget(element) { let value = element.getAttribute('class'); let auTargetID = getNextAUTargetID(); - element.setAttribute('class', value ? value += ' au-target' : 'au-target'); + element.setAttribute('class', value ? value + ' au-target' : 'au-target'); element.setAttribute('au-target-id', auTargetID); return auTargetID; @@ -2295,7 +2295,7 @@ export let ViewCompiler = (_dec7 = inject(BindingLanguage, ViewResources), _dec7 if (targetId) { let ins = instructions[targetId]; - if (ins.shadowSlot || ins.lifting) { + if (ins.shadowSlot || ins.lifting || ins.elementInstruction !== null && !ins.elementInstruction.anchorIsContainer) { content.insertBefore(DOM.createComment('view'), firstChild); } } diff --git a/dist/native-modules/aurelia-templating.js b/dist/native-modules/aurelia-templating.js index c7836b2c..919e8193 100644 --- a/dist/native-modules/aurelia-templating.js +++ b/dist/native-modules/aurelia-templating.js @@ -2413,7 +2413,7 @@ function makeIntoInstructionTarget(element) { var value = element.getAttribute('class'); var auTargetID = getNextAUTargetID(); - element.setAttribute('class', value ? value += ' au-target' : 'au-target'); + element.setAttribute('class', value ? value + ' au-target' : 'au-target'); element.setAttribute('au-target-id', auTargetID); return auTargetID; @@ -2482,7 +2482,7 @@ export var ViewCompiler = (_dec7 = inject(BindingLanguage, ViewResources), _dec7 if (targetId) { var ins = instructions[targetId]; - if (ins.shadowSlot || ins.lifting) { + if (ins.shadowSlot || ins.lifting || ins.elementInstruction !== null && !ins.elementInstruction.anchorIsContainer) { content.insertBefore(DOM.createComment('view'), firstChild); } } diff --git a/dist/system/aurelia-templating.js b/dist/system/aurelia-templating.js index 5fc5ed67..4808ea22 100644 --- a/dist/system/aurelia-templating.js +++ b/dist/system/aurelia-templating.js @@ -345,7 +345,7 @@ System.register(['aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aurelia- var value = element.getAttribute('class'); var auTargetID = getNextAUTargetID(); - element.setAttribute('class', value ? value += ' au-target' : 'au-target'); + element.setAttribute('class', value ? value + ' au-target' : 'au-target'); element.setAttribute('au-target-id', auTargetID); return auTargetID; @@ -2941,7 +2941,7 @@ System.register(['aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aurelia- if (targetId) { var ins = instructions[targetId]; - if (ins.shadowSlot || ins.lifting) { + if (ins.shadowSlot || ins.lifting || ins.elementInstruction !== null && !ins.elementInstruction.anchorIsContainer) { content.insertBefore(DOM.createComment('view'), firstChild); } } diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 19224596..e7c9515c 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,18 @@ + +## [1.1.3](https://github.com/aurelia/templating/compare/1.1.2...v1.1.3) (2016-12-03) + + +### Bug Fixes + +* **view-compiler:** proper anchoring for containerless elements inside of a template controller ([0f12514](https://github.com/aurelia/templating/commit/0f12514)) + + +### Performance Improvements + +* **view-compiler:** remove unnecessary assignment ([ddde119](https://github.com/aurelia/templating/commit/ddde119)) + + + ## [1.1.1](https://github.com/aurelia/templating/compare/1.1.0...v1.1.1) (2016-09-29) diff --git a/package.json b/package.json index 57dfcbce..c7598cf1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating", - "version": "1.1.2", + "version": "1.1.3", "description": "An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.", "keywords": [ "aurelia",