From 919251487f5fef900573373681e21964f5fddc8a Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Thu, 2 Feb 2017 11:23:41 -0800 Subject: [PATCH] Prevent annotator from removing the `is-inert` attribute. --- src/lib/annotations/annotations.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/annotations/annotations.html b/src/lib/annotations/annotations.html index 8d0ed853c2..d9b11b9291 100644 --- a/src/lib/annotations/annotations.html +++ b/src/lib/annotations/annotations.html @@ -65,6 +65,8 @@ // null-array (shared empty array to avoid null-checks) Polymer.nar = []; + var inertEnabled = Polymer.Settings.enableInert; + Polymer.Annotations = { // preprocess-time @@ -367,7 +369,11 @@ node.setAttribute(origName, ''); } // Remove annotation - node.removeAttribute(origName); + if (inertEnabled && origName === 'is-inert') { + node.setAttribute('is-inert', ''); + } else { + node.removeAttribute(origName); + } // Case hackery: attributes are lower-case, but bind targets // (properties) are case sensitive. Gambit is to map dash-case to // camel-case: `foo-bar` becomes `fooBar`.