Skip to content

Commit 759dc24

Browse files
authored
Merge pull request #227 from apinf/feature/ie-dropdown-fix
Fix dropdown optionfields on IE
2 parents e0306a7 + 43eaa48 commit 759dc24

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<template>
2+
<div class="dropdown option field c${columns} columns" if.bind="display">
3+
<label for.bind="id">
4+
${label}
5+
<tooltip if.bind="helpText" text.bind="helpText">
6+
<img src="res/info.svg" alt="Info"/>
7+
</tooltip>
8+
</label>
9+
<select value.bind="selectedChoice" id.bind="id">
10+
<!-- Dropdowns break on IE if we have if.bind, so we don't. -->
11+
<option
12+
repeat.for="choice of allChoices"
13+
model.bind="choice.key"
14+
>${choice.label}</option>
15+
</select>
16+
</div>
17+
</template>

src/resources/elements/optionfield.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,10 @@ export class Optionfield extends Field {
296296
* @private
297297
*/
298298
getViewStrategy() {
299+
// Dropdowns break on IE, so we have a separate HTML file for IE.
300+
if (!!document.documentMode && this.format === 'dropdown') {
301+
return `resources/elements/optionfield-${this.format}-ie.html`;
302+
}
299303
return `resources/elements/optionfield-${this.format}.html`;
300304
}
301305
}

0 commit comments

Comments
 (0)