From d87fa0042375b025b98c40bff05e5f42c00af114 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 24 Jul 2013 16:42:52 -0700 Subject: fix(select): don't support binding to select[multiple] changing the type of select box from single to multiple or the other way around at runtime is currently not supported and the two-way binding does odd stuff when such situation happens. we might eventually support this, but for now we are just going to not allow binding to select[multiple] to prevent people from relying on something that doesn't work. BREAKING CHANGE: binding to select[multiple] directly or via ngMultiple (ng-multiple) directive is not supported. This feature never worked with two-way data-binding, so it's not expected that anybody actually depends on it. Closes #3230 --- src/ng/compile.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ng/compile.js') diff --git a/src/ng/compile.js b/src/ng/compile.js index 46ebe71a..c059af47 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -1220,6 +1220,11 @@ function $CompileProvider($provide) { if (!interpolateFn) return; + if (name === "multiple" && nodeName_(node) === "SELECT") { + throw new $compileMinErr("selmulti", "Binding to the multiple attribute is not supported. Element: {0}", + startingTag(node)); + } + directives.push({ priority: 100, compile: valueFn(function attrInterpolateLinkFn(scope, element, attr) { -- cgit v1.2.3