Skip to content

Commit 3ca1369

Browse files
author
Conrad Sollitt
committed
🐛Plugin Fix and Demo Updates for IE
1 parent 406d97d commit 3ca1369

8 files changed

Lines changed: 40 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Overall the core Framework files, React Components, and Web Components and API a
1313
* `app.addPage()`
1414
* `app.addPlugin()`
1515
* `app.getClassFunctionNames()` - New function
16+
* Bug fix with Chosen Plugin for IE
17+
* https://github.com/dataformsjs/dataformsjs/blob/master/js/plugins/chosen.js
1618
* New class version of the core `jsonData` page object:
1719
* `js/pages/classes/JsonData.js`
1820
* All variables and functions from the original file exist in the new one. The purpose of the new file is so that an app can extend it for custom page logic when defining pages as ES6 classes rather than ES5 objects.

docs/to-do-list.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ TODO List
3939
- Update Quick Docs and Playground Code (after release and CDN refreshes)
4040
- After release update Readme files with new gzipped size for framework:
4141
DataFormsJS Framework – 12.2 kB
42+
- After release, verify country drop-down is fixed:
43+
- List was missing on modern browsers (HTML issue)
44+
- Fixed resulted in a bug with IE that has been fixed
45+
https://dataformsjs.com/examples/places-demo-vue.htm#/en/search
4246

4347
**) Update the Getting Started CSS Template used here:
4448
https://www.dataformsjs.com/en/getting-started

examples/html/npm-start-page.htm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,11 @@ <h1>DataFormsJS Documentation</h1>
273273
<!-- Comment above scripts and un-comment this version test Polyfill in Modern Browsers -->
274274
<!-- <script src="/js/web-components/polyfill.js"></script> -->
275275

276+
<!--
277+
[marked] requires `trimRight` for IE
278+
-->
279+
<script nomodule src="/js/scripts/polyfills.js"></script>
280+
276281
<script>
277282
window.lazyLoad = {
278283
// In the example below [nomodule] can be used, however since <markdown-content>

examples/markdown-hbs.htm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ <h1>DataFormsJS Framework &lt;markdown-content&gt; Control<br> with [<span id="s
101101
<script src="https://cdn.jsdelivr.net/npm/dataformsjs@5/js/pages/jsonData.min.js"></script>
102102
<script src="https://cdn.jsdelivr.net/npm/dataformsjs@5/js/controls/markdown-content.min.js"></script>
103103

104+
<!--
105+
[marked] requires `trimRight` for IE
106+
-->
107+
<script nomodule src="https://cdn.jsdelivr.net/npm/dataformsjs@5/js/scripts/polyfills.min.js"></script>
108+
104109
<!--
105110
Pick a Markdown Library:
106111
https://marked.js.org/

examples/markdown-vue.htm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ <h3 v-if="hasError" class="error">{{ errorMessage }}</h3>
115115
<script src="https://cdn.jsdelivr.net/npm/dataformsjs@5/js/pages/jsonData.min.js"></script>
116116
<script src="https://cdn.jsdelivr.net/npm/dataformsjs@5/js/controls/markdown-content.min.js"></script>
117117

118+
<!--
119+
[marked] requires `trimRight` for IE
120+
-->
121+
<script nomodule src="https://cdn.jsdelivr.net/npm/dataformsjs@5/js/scripts/polyfills.min.js"></script>
122+
118123
<!--
119124
Pick a Markdown Library:
120125
https://marked.js.org/

examples/markdown-web.htm

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,16 @@ <h1>DataFormsJS &lt;markdown-content&gt; Web Component<br> with [<span id="selec
106106
DataFormsJS Web Components
107107
https://www.dataformsjs.com
108108
-->
109-
<script type="module" src="https://cdn.jsdelivr.net/npm/dataformsjs@5/js/web-components/url-router.js"></script>
110-
<script type="module" src="https://cdn.jsdelivr.net/npm/dataformsjs@5/js/web-components/spa-links.js"></script>
109+
<script type="module" src="https://cdn.jsdelivr.net/npm/dataformsjs@5/js/web-components/url-router.min.js"></script>
110+
<script type="module" src="https://cdn.jsdelivr.net/npm/dataformsjs@5/js/web-components/spa-links.min.js"></script>
111111
<script type="module" src="https://cdn.jsdelivr.net/npm/dataformsjs@5/js/web-components/markdown-content.min.js"></script>
112112
<script nomodule src="https://cdn.jsdelivr.net/npm/dataformsjs@5/js/web-components/polyfill.min.js"></script>
113113

114+
<!--
115+
[marked] requires `trimRight` for IE
116+
-->
117+
<script nomodule src="https://cdn.jsdelivr.net/npm/dataformsjs@5/js/scripts/polyfills.min.js"></script>
118+
114119
<script>
115120
window.lazyLoad = {
116121
json_data: { module: 'https://cdn.jsdelivr.net/npm/dataformsjs@5/js/web-components/json-data.min.js' },

js/plugins/chosen.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
22
* DataFormsJS Plugin to setup jQuery Chosen elements
3-
*
3+
*
44
* Example usage:
55
* <select class="chosen-select" data-chosen-options="{&quot;allow_single_deselect&quot;:true}">
6-
*
6+
*
77
* @link https://harvesthq.github.io/chosen/
88
*/
99

@@ -45,7 +45,14 @@
4545
// By default chosen blocks the standard 'change' and 'input' events.
4646
// Make sure 'input' events run so other plugins or code such as
4747
// [dataBind.js] behave as expected.
48-
e.target.dispatchEvent(new Event('input'));
48+
var event, eventName = 'input';
49+
if (typeof(Event) === 'function') {
50+
event = new Event(eventName, { bubbles: true }); // Modern Browsers
51+
} else {
52+
event = document.createEvent('Event'); // IE 11
53+
event.initEvent(eventName, true, false);
54+
}
55+
e.target.dispatchEvent(event);
4956
});
5057
});
5158
}
@@ -60,5 +67,5 @@
6067
}
6168

6269
// Add Plugin to App
63-
app.addPlugin('chosen', setupChosen);
70+
app.addPlugin('chosen', setupChosen);
6471
})();

js/plugins/chosen.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)