From 43eaa485f67e62b73a495776b4a3ebc5b36f1c5a Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 30 Jun 2017 14:56:53 +0300 Subject: [PATCH] Fix dropdown optionfields on IE --- .../elements/optionfield-dropdown-ie.html | 17 +++++++++++++++++ src/resources/elements/optionfield.js | 4 ++++ 2 files changed, 21 insertions(+) create mode 100644 src/resources/elements/optionfield-dropdown-ie.html diff --git a/src/resources/elements/optionfield-dropdown-ie.html b/src/resources/elements/optionfield-dropdown-ie.html new file mode 100644 index 00000000..f9de6152 --- /dev/null +++ b/src/resources/elements/optionfield-dropdown-ie.html @@ -0,0 +1,17 @@ + diff --git a/src/resources/elements/optionfield.js b/src/resources/elements/optionfield.js index b461da2a..1992cc78 100644 --- a/src/resources/elements/optionfield.js +++ b/src/resources/elements/optionfield.js @@ -296,6 +296,10 @@ export class Optionfield extends Field { * @private */ getViewStrategy() { + // Dropdowns break on IE, so we have a separate HTML file for IE. + if (!!document.documentMode && this.format === 'dropdown') { + return `resources/elements/optionfield-${this.format}-ie.html`; + } return `resources/elements/optionfield-${this.format}.html`; } }