File tree 5 files changed +23
-4
lines changed 5 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ export class App {
80
80
this . richPreview = new SwaggerUIBundle ( {
81
81
url,
82
82
dom_id : '#rich-preview' ,
83
+ // Disable Swagger.io online validation (AKA spyware)
84
+ validatorUrl : null ,
83
85
presets : [
84
86
SwaggerUIBundle . presets . apis ,
85
87
SwaggerUIStandalonePreset
@@ -146,6 +148,20 @@ export class App {
146
148
fileInput . appendTo ( 'body' ) ;
147
149
fileInput . trigger ( 'click' ) ;
148
150
151
+ // IE/Edge don't want to trigger change events, so I have to do it for them...
152
+ //
153
+ // Check that the browser is IE/Edge
154
+ if ( ! ! window . StyleMedia ) {
155
+ // Check if there is a file every 0.5 seconds
156
+ const interval = setInterval ( ( ) => {
157
+ if ( fileInput [ 0 ] . files [ 0 ] ) {
158
+ // The file was found, so trigger a change event and stop the interval.
159
+ fileInput . trigger ( 'change' ) ;
160
+ clearInterval ( interval ) ;
161
+ }
162
+ } , 500 ) ;
163
+ }
164
+
149
165
fileInput . change ( ( ) => {
150
166
const file = fileInput [ 0 ] . files [ 0 ] ;
151
167
const reader = new FileReader ( ) ;
Original file line number Diff line number Diff line change @@ -281,8 +281,8 @@ export class Optionfield extends Field {
281
281
* @private
282
282
*/
283
283
getViewStrategy ( ) {
284
- // Dropdowns break on IE, so we have a separate HTML file for IE .
285
- if ( ! ! document . documentMode && this . format === 'dropdown' ) {
284
+ // Dropdowns break on IE and Edge , so we have a separate HTML file for them .
285
+ if ( ! ! window . StyleMedia && this . format === 'dropdown' ) {
286
286
return `resources/elements/optionfield-${ this . format } -ie.html` ;
287
287
}
288
288
return `resources/elements/optionfield-${ this . format } .html` ;
Original file line number Diff line number Diff line change 38
38
< div class ="actions ">
39
39
< div class ="split dropdown ">
40
40
< button class ="button ">
41
- < img src ="res/split.svg " alt ="Delete "/>
41
+ < img src ="res/split.svg " alt ="Split "/>
42
42
</ button >
43
43
< div class ="content ">
44
44
< a href ="javascript:void(0) " click.delegate ="split('editor') " t ="nav.actions.split.editor ">
Original file line number Diff line number Diff line change 23
23
24
24
> .content {
25
25
position : absolute ;
26
- z-index : 1 ;
26
+ z-index : 10 ;
27
27
28
28
display : none ;
29
29
Original file line number Diff line number Diff line change 52
52
}
53
53
54
54
> .actions {
55
+ position : relative ;
56
+ z-index : 9 ;
57
+
55
58
float : right ;
56
59
57
60
max-height : 2.5rem ;
You can’t perform that action at this time.
0 commit comments