jsuites 4.9.28 → 4.9.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,8 @@
12
12
  :root {
13
13
  --button-color: #298BA8;
14
14
  --active-color: #007aff;
15
+ --safe-area-top: env(safe-area-inset-top);
16
+ --safe-area-bottom: env(safe-area-inset-bottom);
15
17
  }
16
18
 
17
19
  div[data-before]:before {
@@ -527,7 +529,6 @@ div[data-before]:before {
527
529
 
528
530
 
529
531
  .jcolor {
530
- position: absolute;
531
532
  display: none;
532
533
  outline: none;
533
534
  }
@@ -542,7 +543,6 @@ div[data-before]:before {
542
543
 
543
544
  .jcolor-content {
544
545
  position: absolute;
545
- left: 0px;
546
546
  z-index: 9000;
547
547
  user-select: none;
548
548
  -webkit-font-smoothing: antialiased;
@@ -601,6 +601,7 @@ div[data-before]:before {
601
601
 
602
602
  .jcolor-fullscreen {
603
603
  position: fixed;
604
+ left: 0px;
604
605
  bottom: 0px;
605
606
  width:100%;
606
607
  max-height: 290px;
@@ -1753,7 +1754,7 @@ div[data-before]:before {
1753
1754
 
1754
1755
  @media (max-width: 800px) {
1755
1756
  .jnotification {
1756
- top: 0px;
1757
+ top: calc(0px + var(--safe-area-top));
1757
1758
  width: 100%;
1758
1759
  }
1759
1760
  .jnotification-container {
@@ -2085,7 +2086,6 @@ div[data-before]:before {
2085
2086
  }
2086
2087
 
2087
2088
  .jtoolbar .jtoolbar-item {
2088
- position: relative;
2089
2089
  text-align: center;
2090
2090
  margin: auto;
2091
2091
  padding: 2px;
@@ -2094,6 +2094,7 @@ div[data-before]:before {
2094
2094
  }
2095
2095
 
2096
2096
  .jtoolbar-mobile .jtoolbar-item {
2097
+ position: relative;
2097
2098
  flex:1;
2098
2099
  }
2099
2100
 
@@ -2219,10 +2220,6 @@ div[data-before]:before {
2219
2220
  display: none;
2220
2221
  }
2221
2222
 
2222
- .jtoolbar-floating > div {
2223
- display: block;
2224
- }
2225
-
2226
2223
  .jtoolbar-arrow-selected .jtoolbar-floating {
2227
2224
  display: flex;
2228
2225
  flex-wrap: wrap;
@@ -17,7 +17,7 @@
17
17
 
18
18
  var jSuites = function(options) {
19
19
  var obj = {}
20
- var version = '4.9.28';
20
+ var version = '4.9.32';
21
21
 
22
22
  var find = function(DOMElement, component) {
23
23
  if (DOMElement[component.type] && DOMElement[component.type] == component) {
@@ -902,9 +902,9 @@ jSuites.calendar = (function(el, options) {
902
902
  // Lemonade JS
903
903
  if (el.value != val) {
904
904
  el.value = val;
905
- if (typeof(el.onchange) == 'function') {
906
- el.onchange({
907
- type: 'change',
905
+ if (typeof(el.oninput) == 'function') {
906
+ el.oninput({
907
+ type: 'input',
908
908
  target: el,
909
909
  value: el.value
910
910
  });
@@ -2035,10 +2035,15 @@ jSuites.color = (function(el, options) {
2035
2035
  // Show colorpicker
2036
2036
  container.classList.add('jcolor-focus');
2037
2037
 
2038
+ // Reset margin
2039
+ content.style.marginTop = '';
2040
+ content.style.marginLeft = '';
2041
+
2038
2042
  var rectContent = content.getBoundingClientRect();
2043
+ var availableWidth = jSuites.getWindowWidth();
2044
+ var availableHeight = jSuites.getWindowHeight();
2039
2045
 
2040
- if (jSuites.getWindowWidth() < 800 || obj.options.fullscreen == true) {
2041
- content.style.top = '';
2046
+ if (availableWidth < 800 || obj.options.fullscreen == true) {
2042
2047
  content.classList.add('jcolor-fullscreen');
2043
2048
  jSuites.animation.slideBottom(content, 1);
2044
2049
  backdrop.style.display = 'block';
@@ -2048,25 +2053,21 @@ jSuites.color = (function(el, options) {
2048
2053
  backdrop.style.display = '';
2049
2054
  }
2050
2055
 
2051
- var rect = el.getBoundingClientRect();
2052
-
2053
2056
  if (obj.options.position) {
2054
2057
  content.style.position = 'fixed';
2055
- if (window.innerHeight < rect.bottom + rectContent.height) {
2056
- content.style.top = (rect.top - (rectContent.height + 2)) + 'px';
2057
- } else {
2058
- content.style.top = (rect.top + rect.height + 2) + 'px';
2059
- }
2060
- content.style.left = rect.left + 'px';
2061
2058
  } else {
2062
- if (window.innerHeight < rect.bottom + rectContent.height) {
2063
- content.style.top = -1 * (rectContent.height + rect.height + 2) + 'px';
2064
- } else {
2065
- content.style.top = '2px';
2066
- }
2059
+ content.style.position = '';
2060
+ }
2061
+
2062
+ if (rectContent.left + rectContent.width > availableWidth) {
2063
+ content.style.marginLeft = -1 * (rectContent.left + rectContent.width - (availableWidth - 20)) + 'px';
2064
+ }
2065
+ if (rectContent.top + rectContent.height > availableHeight) {
2066
+ content.style.marginTop = -1 * (rectContent.top + rectContent.height - (availableHeight - 20)) + 'px';
2067
2067
  }
2068
2068
  }
2069
2069
 
2070
+
2070
2071
  if (typeof(obj.options.onopen) == 'function') {
2071
2072
  obj.options.onopen(el);
2072
2073
  }
@@ -2138,9 +2139,9 @@ jSuites.color = (function(el, options) {
2138
2139
  // Set input value
2139
2140
  el.value = obj.options.value;
2140
2141
  // Element onchange native
2141
- if (typeof(el.onchange) == 'function') {
2142
- el.onchange({
2143
- type: 'change',
2142
+ if (typeof(el.oninput) == 'function') {
2143
+ el.oninput({
2144
+ type: 'input',
2144
2145
  target: el,
2145
2146
  value: el.value
2146
2147
  });
@@ -2542,10 +2543,10 @@ jSuites.color = (function(el, options) {
2542
2543
  backdropClickControl = true;
2543
2544
  });
2544
2545
 
2545
- backdrop.addEventListener("mouseup", function(e) {
2546
+ backdrop.addEventListener("click", function(e) {
2546
2547
  if (backdropClickControl) {
2547
- obj.close();
2548
2548
  backdropClickControl = false;
2549
+ obj.close();
2549
2550
  }
2550
2551
  });
2551
2552
 
@@ -2868,11 +2869,11 @@ jSuites.dropdown = (function(el, options) {
2868
2869
  }
2869
2870
 
2870
2871
  obj.setData(data);
2872
+ }
2871
2873
 
2872
- // Onload method
2873
- if (typeof(obj.options.onload) == 'function') {
2874
- obj.options.onload(el, obj, data, val);
2875
- }
2874
+ // Onload method
2875
+ if (typeof(obj.options.onload) == 'function') {
2876
+ obj.options.onload(el, obj, data, val);
2876
2877
  }
2877
2878
 
2878
2879
  // Set value
@@ -2916,9 +2917,9 @@ jSuites.dropdown = (function(el, options) {
2916
2917
  }
2917
2918
  }
2918
2919
 
2919
- if(typeof testA == "string" || typeof testB == "string") {
2920
- if(typeof testA != "string") { testA = ""+testA; }
2921
- if(typeof testB != "string") { testB = ""+testB; }
2920
+ if (typeof testA == "string" || typeof testB == "string") {
2921
+ if (typeof testA != "string") { testA = ""+testA; }
2922
+ if (typeof testB != "string") { testB = ""+testB; }
2922
2923
  return testA.localeCompare(testB);
2923
2924
  } else {
2924
2925
  return testA - testB;
@@ -3743,9 +3744,9 @@ jSuites.dropdown = (function(el, options) {
3743
3744
  // Lemonade JS
3744
3745
  if (el.value != obj.options.value) {
3745
3746
  el.value = obj.options.value;
3746
- if (typeof(el.onchange) == 'function') {
3747
- el.onchange({
3748
- type: 'change',
3747
+ if (typeof(el.oninput) == 'function') {
3748
+ el.oninput({
3749
+ type: 'input',
3749
3750
  target: el,
3750
3751
  value: el.value
3751
3752
  });
@@ -4738,9 +4739,9 @@ jSuites.editor = (function(el, options) {
4738
4739
  // Lemonade JS
4739
4740
  if (el.value != obj.options.value) {
4740
4741
  el.value = obj.options.value;
4741
- if (typeof(el.onchange) == 'function') {
4742
- el.onchange({
4743
- type: 'change',
4742
+ if (typeof(el.oninput) == 'function') {
4743
+ el.oninput({
4744
+ type: 'input',
4744
4745
  target: el,
4745
4746
  value: el.value
4746
4747
  });
@@ -8295,9 +8296,9 @@ jSuites.picker = (function(el, options) {
8295
8296
  // Lemonade JS
8296
8297
  if (el.value != obj.options.value) {
8297
8298
  el.value = obj.options.value;
8298
- if (typeof(el.onchange) == 'function') {
8299
- el.onchange({
8300
- type: 'change',
8299
+ if (typeof(el.oninput) == 'function') {
8300
+ el.oninput({
8301
+ type: 'input',
8301
8302
  target: el,
8302
8303
  value: el.value
8303
8304
  });
@@ -8336,18 +8337,35 @@ jSuites.picker = (function(el, options) {
8336
8337
  el.classList.add('jpicker-focus');
8337
8338
  el.focus();
8338
8339
 
8340
+ var top = 0;
8341
+ var left = 0;
8342
+
8343
+ dropdownContent.style.marginLeft = '';
8344
+
8339
8345
  var rectHeader = dropdownHeader.getBoundingClientRect();
8340
8346
  var rectContent = dropdownContent.getBoundingClientRect();
8347
+
8341
8348
  if (window.innerHeight < rectHeader.bottom + rectContent.height) {
8342
- dropdownContent.style.marginTop = -1 * (rectContent.height + 4) + 'px';
8349
+ top = -1 * (rectContent.height + 4);
8343
8350
  } else {
8344
- dropdownContent.style.marginTop = rectHeader.height + 2 + 'px';
8351
+ top = rectHeader.height + 4;
8345
8352
  }
8346
8353
 
8347
8354
  if (obj.options.right === true) {
8348
- dropdownContent.style.marginLeft = -1 * rectContent.width + 24 + 'px';
8355
+ left = -1 * rectContent.width + rectHeader.width;
8356
+ }
8357
+
8358
+ if (rectContent.left + left < 0) {
8359
+ left = left + rectContent.left + 10;
8349
8360
  }
8361
+ if (rectContent.left + rectContent.width > window.innerWidth) {
8362
+ left = -1 * (10 + rectContent.left + rectContent.width - window.innerWidth);
8363
+ }
8364
+
8365
+ dropdownContent.style.marginTop = parseInt(top) + 'px';
8366
+ dropdownContent.style.marginLeft = parseInt(left) + 'px';
8350
8367
 
8368
+ //dropdownContent.style.marginTop
8351
8369
  if (typeof obj.options.onopen == 'function') {
8352
8370
  obj.options.onopen(el, obj);
8353
8371
  }
@@ -8509,9 +8527,9 @@ jSuites.rating = (function(el, options) {
8509
8527
  // Lemonade JS
8510
8528
  if (el.value != obj.options.value) {
8511
8529
  el.value = obj.options.value;
8512
- if (typeof(el.onchange) == 'function') {
8513
- el.onchange({
8514
- type: 'change',
8530
+ if (typeof(el.oninput) == 'function') {
8531
+ el.oninput({
8532
+ type: 'input',
8515
8533
  target: el,
8516
8534
  value: el.value
8517
8535
  });
package/dist/jsuites.css CHANGED
@@ -12,6 +12,8 @@
12
12
  :root {
13
13
  --button-color: #298BA8;
14
14
  --active-color: #007aff;
15
+ --safe-area-top: env(safe-area-inset-top);
16
+ --safe-area-bottom: env(safe-area-inset-bottom);
15
17
  }
16
18
 
17
19
  div[data-before]:before {
@@ -527,7 +529,6 @@ div[data-before]:before {
527
529
 
528
530
 
529
531
  .jcolor {
530
- position: absolute;
531
532
  display: none;
532
533
  outline: none;
533
534
  }
@@ -542,7 +543,6 @@ div[data-before]:before {
542
543
 
543
544
  .jcolor-content {
544
545
  position: absolute;
545
- left: 0px;
546
546
  z-index: 9000;
547
547
  user-select: none;
548
548
  -webkit-font-smoothing: antialiased;
@@ -601,6 +601,7 @@ div[data-before]:before {
601
601
 
602
602
  .jcolor-fullscreen {
603
603
  position: fixed;
604
+ left: 0px;
604
605
  bottom: 0px;
605
606
  width:100%;
606
607
  max-height: 290px;
@@ -1845,7 +1846,7 @@ div[data-before]:before {
1845
1846
 
1846
1847
  @media (max-width: 800px) {
1847
1848
  .jnotification {
1848
- top: 0px;
1849
+ top: calc(0px + var(--safe-area-top));
1849
1850
  width: 100%;
1850
1851
  }
1851
1852
  .jnotification-container {
@@ -2655,7 +2656,6 @@ div[data-before]:before {
2655
2656
  }
2656
2657
 
2657
2658
  .jtoolbar .jtoolbar-item {
2658
- position: relative;
2659
2659
  text-align: center;
2660
2660
  margin: auto;
2661
2661
  padding: 2px;
@@ -2664,6 +2664,7 @@ div[data-before]:before {
2664
2664
  }
2665
2665
 
2666
2666
  .jtoolbar-mobile .jtoolbar-item {
2667
+ position: relative;
2667
2668
  flex:1;
2668
2669
  }
2669
2670
 
@@ -2789,10 +2790,6 @@ div[data-before]:before {
2789
2790
  display: none;
2790
2791
  }
2791
2792
 
2792
- .jtoolbar-floating > div {
2793
- display: block;
2794
- }
2795
-
2796
2793
  .jtoolbar-arrow-selected .jtoolbar-floating {
2797
2794
  display: flex;
2798
2795
  flex-wrap: wrap;
package/dist/jsuites.js CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  var jSuites = function(options) {
19
19
  var obj = {}
20
- var version = '4.9.28';
20
+ var version = '4.9.32';
21
21
 
22
22
  var find = function(DOMElement, component) {
23
23
  if (DOMElement[component.type] && DOMElement[component.type] == component) {
@@ -913,9 +913,9 @@ jSuites.calendar = (function(el, options) {
913
913
  // Lemonade JS
914
914
  if (el.value != val) {
915
915
  el.value = val;
916
- if (typeof(el.onchange) == 'function') {
917
- el.onchange({
918
- type: 'change',
916
+ if (typeof(el.oninput) == 'function') {
917
+ el.oninput({
918
+ type: 'input',
919
919
  target: el,
920
920
  value: el.value
921
921
  });
@@ -2046,10 +2046,15 @@ jSuites.color = (function(el, options) {
2046
2046
  // Show colorpicker
2047
2047
  container.classList.add('jcolor-focus');
2048
2048
 
2049
+ // Reset margin
2050
+ content.style.marginTop = '';
2051
+ content.style.marginLeft = '';
2052
+
2049
2053
  var rectContent = content.getBoundingClientRect();
2054
+ var availableWidth = jSuites.getWindowWidth();
2055
+ var availableHeight = jSuites.getWindowHeight();
2050
2056
 
2051
- if (jSuites.getWindowWidth() < 800 || obj.options.fullscreen == true) {
2052
- content.style.top = '';
2057
+ if (availableWidth < 800 || obj.options.fullscreen == true) {
2053
2058
  content.classList.add('jcolor-fullscreen');
2054
2059
  jSuites.animation.slideBottom(content, 1);
2055
2060
  backdrop.style.display = 'block';
@@ -2059,25 +2064,21 @@ jSuites.color = (function(el, options) {
2059
2064
  backdrop.style.display = '';
2060
2065
  }
2061
2066
 
2062
- var rect = el.getBoundingClientRect();
2063
-
2064
2067
  if (obj.options.position) {
2065
2068
  content.style.position = 'fixed';
2066
- if (window.innerHeight < rect.bottom + rectContent.height) {
2067
- content.style.top = (rect.top - (rectContent.height + 2)) + 'px';
2068
- } else {
2069
- content.style.top = (rect.top + rect.height + 2) + 'px';
2070
- }
2071
- content.style.left = rect.left + 'px';
2072
2069
  } else {
2073
- if (window.innerHeight < rect.bottom + rectContent.height) {
2074
- content.style.top = -1 * (rectContent.height + rect.height + 2) + 'px';
2075
- } else {
2076
- content.style.top = '2px';
2077
- }
2070
+ content.style.position = '';
2071
+ }
2072
+
2073
+ if (rectContent.left + rectContent.width > availableWidth) {
2074
+ content.style.marginLeft = -1 * (rectContent.left + rectContent.width - (availableWidth - 20)) + 'px';
2075
+ }
2076
+ if (rectContent.top + rectContent.height > availableHeight) {
2077
+ content.style.marginTop = -1 * (rectContent.top + rectContent.height - (availableHeight - 20)) + 'px';
2078
2078
  }
2079
2079
  }
2080
2080
 
2081
+
2081
2082
  if (typeof(obj.options.onopen) == 'function') {
2082
2083
  obj.options.onopen(el);
2083
2084
  }
@@ -2149,9 +2150,9 @@ jSuites.color = (function(el, options) {
2149
2150
  // Set input value
2150
2151
  el.value = obj.options.value;
2151
2152
  // Element onchange native
2152
- if (typeof(el.onchange) == 'function') {
2153
- el.onchange({
2154
- type: 'change',
2153
+ if (typeof(el.oninput) == 'function') {
2154
+ el.oninput({
2155
+ type: 'input',
2155
2156
  target: el,
2156
2157
  value: el.value
2157
2158
  });
@@ -2553,10 +2554,10 @@ jSuites.color = (function(el, options) {
2553
2554
  backdropClickControl = true;
2554
2555
  });
2555
2556
 
2556
- backdrop.addEventListener("mouseup", function(e) {
2557
+ backdrop.addEventListener("click", function(e) {
2557
2558
  if (backdropClickControl) {
2558
- obj.close();
2559
2559
  backdropClickControl = false;
2560
+ obj.close();
2560
2561
  }
2561
2562
  });
2562
2563
 
@@ -2879,11 +2880,11 @@ jSuites.dropdown = (function(el, options) {
2879
2880
  }
2880
2881
 
2881
2882
  obj.setData(data);
2883
+ }
2882
2884
 
2883
- // Onload method
2884
- if (typeof(obj.options.onload) == 'function') {
2885
- obj.options.onload(el, obj, data, val);
2886
- }
2885
+ // Onload method
2886
+ if (typeof(obj.options.onload) == 'function') {
2887
+ obj.options.onload(el, obj, data, val);
2887
2888
  }
2888
2889
 
2889
2890
  // Set value
@@ -2927,9 +2928,9 @@ jSuites.dropdown = (function(el, options) {
2927
2928
  }
2928
2929
  }
2929
2930
 
2930
- if(typeof testA == "string" || typeof testB == "string") {
2931
- if(typeof testA != "string") { testA = ""+testA; }
2932
- if(typeof testB != "string") { testB = ""+testB; }
2931
+ if (typeof testA == "string" || typeof testB == "string") {
2932
+ if (typeof testA != "string") { testA = ""+testA; }
2933
+ if (typeof testB != "string") { testB = ""+testB; }
2933
2934
  return testA.localeCompare(testB);
2934
2935
  } else {
2935
2936
  return testA - testB;
@@ -3754,9 +3755,9 @@ jSuites.dropdown = (function(el, options) {
3754
3755
  // Lemonade JS
3755
3756
  if (el.value != obj.options.value) {
3756
3757
  el.value = obj.options.value;
3757
- if (typeof(el.onchange) == 'function') {
3758
- el.onchange({
3759
- type: 'change',
3758
+ if (typeof(el.oninput) == 'function') {
3759
+ el.oninput({
3760
+ type: 'input',
3760
3761
  target: el,
3761
3762
  value: el.value
3762
3763
  });
@@ -4749,9 +4750,9 @@ jSuites.editor = (function(el, options) {
4749
4750
  // Lemonade JS
4750
4751
  if (el.value != obj.options.value) {
4751
4752
  el.value = obj.options.value;
4752
- if (typeof(el.onchange) == 'function') {
4753
- el.onchange({
4754
- type: 'change',
4753
+ if (typeof(el.oninput) == 'function') {
4754
+ el.oninput({
4755
+ type: 'input',
4755
4756
  target: el,
4756
4757
  value: el.value
4757
4758
  });
@@ -8947,9 +8948,9 @@ jSuites.picker = (function(el, options) {
8947
8948
  // Lemonade JS
8948
8949
  if (el.value != obj.options.value) {
8949
8950
  el.value = obj.options.value;
8950
- if (typeof(el.onchange) == 'function') {
8951
- el.onchange({
8952
- type: 'change',
8951
+ if (typeof(el.oninput) == 'function') {
8952
+ el.oninput({
8953
+ type: 'input',
8953
8954
  target: el,
8954
8955
  value: el.value
8955
8956
  });
@@ -8988,18 +8989,35 @@ jSuites.picker = (function(el, options) {
8988
8989
  el.classList.add('jpicker-focus');
8989
8990
  el.focus();
8990
8991
 
8992
+ var top = 0;
8993
+ var left = 0;
8994
+
8995
+ dropdownContent.style.marginLeft = '';
8996
+
8991
8997
  var rectHeader = dropdownHeader.getBoundingClientRect();
8992
8998
  var rectContent = dropdownContent.getBoundingClientRect();
8999
+
8993
9000
  if (window.innerHeight < rectHeader.bottom + rectContent.height) {
8994
- dropdownContent.style.marginTop = -1 * (rectContent.height + 4) + 'px';
9001
+ top = -1 * (rectContent.height + 4);
8995
9002
  } else {
8996
- dropdownContent.style.marginTop = rectHeader.height + 2 + 'px';
9003
+ top = rectHeader.height + 4;
8997
9004
  }
8998
9005
 
8999
9006
  if (obj.options.right === true) {
9000
- dropdownContent.style.marginLeft = -1 * rectContent.width + 24 + 'px';
9007
+ left = -1 * rectContent.width + rectHeader.width;
9008
+ }
9009
+
9010
+ if (rectContent.left + left < 0) {
9011
+ left = left + rectContent.left + 10;
9001
9012
  }
9013
+ if (rectContent.left + rectContent.width > window.innerWidth) {
9014
+ left = -1 * (10 + rectContent.left + rectContent.width - window.innerWidth);
9015
+ }
9016
+
9017
+ dropdownContent.style.marginTop = parseInt(top) + 'px';
9018
+ dropdownContent.style.marginLeft = parseInt(left) + 'px';
9002
9019
 
9020
+ //dropdownContent.style.marginTop
9003
9021
  if (typeof obj.options.onopen == 'function') {
9004
9022
  obj.options.onopen(el, obj);
9005
9023
  }
@@ -9145,9 +9163,9 @@ jSuites.progressbar = (function(el, options) {
9145
9163
  // Lemonade JS
9146
9164
  if (el.value != obj.options.value) {
9147
9165
  el.value = obj.options.value;
9148
- if (typeof(el.onchange) == 'function') {
9149
- el.onchange({
9150
- type: 'change',
9166
+ if (typeof(el.oninput) == 'function') {
9167
+ el.oninput({
9168
+ type: 'input',
9151
9169
  target: el,
9152
9170
  value: el.value
9153
9171
  });
@@ -9276,9 +9294,9 @@ jSuites.rating = (function(el, options) {
9276
9294
  // Lemonade JS
9277
9295
  if (el.value != obj.options.value) {
9278
9296
  el.value = obj.options.value;
9279
- if (typeof(el.onchange) == 'function') {
9280
- el.onchange({
9281
- type: 'change',
9297
+ if (typeof(el.oninput) == 'function') {
9298
+ el.oninput({
9299
+ type: 'input',
9282
9300
  target: el,
9283
9301
  value: el.value
9284
9302
  });
@@ -10849,9 +10867,9 @@ jSuites.tags = (function(el, options) {
10849
10867
  // Lemonade JS
10850
10868
  if (el.value != obj.options.value) {
10851
10869
  el.value = obj.options.value;
10852
- if (typeof(el.onchange) == 'function') {
10853
- el.onchange({
10854
- type: 'change',
10870
+ if (typeof(el.oninput) == 'function') {
10871
+ el.oninput({
10872
+ type: 'input',
10855
10873
  target: el,
10856
10874
  value: el.value
10857
10875
  });
@@ -1698,11 +1698,12 @@ jSuites.menu = (function(el, options) {
1698
1698
  var menu = el.querySelectorAll('nav');
1699
1699
  var selected = null;
1700
1700
  for (var i = 0; i < menu.length; i++) {
1701
- menu[i].classList.remove('selected');
1702
1701
  if (menu[i].getAttribute('data-id')) {
1703
1702
  var state = localStorage.getItem('jmenu-' + menu[i].getAttribute('data-id'));
1704
- if (state == 1) {
1703
+ if (state === '1') {
1705
1704
  menu[i].classList.add('selected');
1705
+ } else if (state === '0') {
1706
+ menu[i].classList.remove('selected');
1706
1707
  }
1707
1708
  }
1708
1709
  }
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "javascript plugins"
20
20
  ],
21
21
  "main": "dist/jsuites.js",
22
- "version": "4.9.28",
22
+ "version": "4.9.32",
23
23
  "bugs": "https://github.com/jsuites/jsuites/issues",
24
24
  "homepage": "https://github.com/jsuites/jsuites",
25
25
  "docs": "https://jsuites.net",