@subiz/widget-v4 4.1.106 → 4.1.107

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@subiz/widget-v4",
3
- "version": "4.1.106",
3
+ "version": "4.1.107",
4
4
  "main": "./compiled_src/lib.js",
5
5
  "scripts": {
6
6
  "dev": "npx webpack serve --config webpack.dev.js",
@@ -906,6 +906,12 @@ export default class Popup extends Com {
906
906
  return containercss
907
907
  }
908
908
 
909
+ onClickOverlay() {
910
+ let popup = sb.get(this.props.plugin, 'popup', {})
911
+ if (!popup.overlay) return
912
+ this.setClose(true)
913
+ }
914
+
909
915
  render() {
910
916
  if (!this.props.t) return null
911
917
  if (!this.state.cssready) return null
@@ -984,7 +990,7 @@ export default class Popup extends Com {
984
990
  }
985
991
 
986
992
  return (
987
- <div class='overlay' style={overlaystyle}>
993
+ <div class='overlay' style={overlaystyle} onClick={() => this.onClickOverlay()}>
988
994
  <div class={animation} style={this.js2css(containercss)} onClick={(e) => e.stopPropagation()}>
989
995
  {this.renderCloseButton()}
990
996
  <div style={this.js2css(bodycss)} onClick={(e) => this.onButtonClick(e, 'background')}>