@vvfx/sdk 0.2.2-beta.7 → 0.2.2-beta.8
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/dist/html-overlay/manager.d.ts +1 -0
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: TODO
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 赤芍,何即,不择,意绮
|
|
6
|
-
* Version: v0.2.2-beta.
|
|
6
|
+
* Version: v0.2.2-beta.8
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -92573,6 +92573,9 @@ var HTMLOverlayManager = /*#__PURE__*/ function() {
|
|
|
92573
92573
|
};
|
|
92574
92574
|
_proto.syncActiveContentInteraction = function syncActiveContentInteraction(event) {
|
|
92575
92575
|
var decision = this.resolveHTMLInteractionTarget(event);
|
|
92576
|
+
if (decision.kind === 'canvas' && this.shouldKeepActiveContentInteractionForFocusedElement()) {
|
|
92577
|
+
return;
|
|
92578
|
+
}
|
|
92576
92579
|
this.setActiveContentInteraction(decision.kind === 'html' ? decision.interaction : undefined);
|
|
92577
92580
|
};
|
|
92578
92581
|
_proto.scheduleActiveContentInteractionSync = function scheduleActiveContentInteractionSync(event) {
|
|
@@ -92612,6 +92615,18 @@ var HTMLOverlayManager = /*#__PURE__*/ function() {
|
|
|
92612
92615
|
_this.syncContentInteraction(id);
|
|
92613
92616
|
});
|
|
92614
92617
|
};
|
|
92618
|
+
_proto.shouldKeepActiveContentInteractionForFocusedElement = function shouldKeepActiveContentInteractionForFocusedElement() {
|
|
92619
|
+
var activeInteraction = this.state.activeContentInteraction;
|
|
92620
|
+
if (!activeInteraction || typeof document === 'undefined') {
|
|
92621
|
+
return false;
|
|
92622
|
+
}
|
|
92623
|
+
var activeElement = document.activeElement;
|
|
92624
|
+
if (!activeElement || activeElement === document.body) {
|
|
92625
|
+
return false;
|
|
92626
|
+
}
|
|
92627
|
+
var interactionElement = activeInteraction.element;
|
|
92628
|
+
return interactionElement === activeElement || typeof interactionElement.contains === 'function' && interactionElement.contains(activeElement);
|
|
92629
|
+
};
|
|
92615
92630
|
_proto.resolveHTMLInteractionTarget = function resolveHTMLInteractionTarget(event) {
|
|
92616
92631
|
var id = this.getHTMLCardIdByEvent(event);
|
|
92617
92632
|
if (!id || this.isEditableCard(id)) {
|