@pageboard/html 0.14.13 → 0.14.14

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.
package/elements/image.js CHANGED
@@ -1,6 +1,6 @@
1
1
  exports.image = {
2
2
  title: "Image",
3
- priority: 0,
3
+ priority: -1,
4
4
  menu: 'media',
5
5
  icon: '<i class="icon image"></i>',
6
6
  properties: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageboard/html",
3
- "version": "0.14.13",
3
+ "version": "0.14.14",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "repository": {
package/ui/consent.js CHANGED
@@ -38,7 +38,7 @@ class HTMLElementConsent extends Page.create(HTMLFormElement) {
38
38
  }
39
39
  state.scope.storage.set('consent', consent);
40
40
  state.scope.$consent = consent;
41
- state.runChain('consent');
41
+ state.copy().runChain('consent');
42
42
  }
43
43
  handleChange(e, state) {
44
44
  this.handleSubmit(e, state);
@@ -59,10 +59,6 @@ class HTMLElementConsent extends Page.create(HTMLFormElement) {
59
59
  }
60
60
  }
61
61
 
62
-
63
- Page.define(`element-consent`, HTMLElementConsent, 'form');
64
-
65
-
66
62
  Page.constructor.prototype.consent = function (fn) {
67
63
  const initial = this.scope.$consent === undefined;
68
64
  let consent = this.scope.storage.get('consent');
@@ -90,12 +86,18 @@ Page.constructor.prototype.reconsent = function (fn) {
90
86
  return asking;
91
87
  };
92
88
 
89
+ Page.define(`element-consent`, HTMLElementConsent, 'form');
90
+
91
+
93
92
  Page.paint(state => {
94
93
  state.finish(() => {
95
94
  let run = true;
96
95
  if (HTMLElementConsent.waiting) {
97
96
  if (state.reconsent()) run = false;
98
97
  }
99
- if (run) state.runChain('consent');
98
+ if (run) {
99
+ // do not change current state stage
100
+ state.copy().runChain('consent');
101
+ }
100
102
  });
101
103
  });