next icon indicating copy to clipboard operation
next copied to clipboard

fix(Dialog): handle dialog&overlay event bind and bubble

Open wukidy opened this issue 1 year ago • 4 comments

Feature Description dialog addKeyDownEventOnWrapper 增加属性,增加 keydown 事件在 wrapper 上 overlayt 增加 addKeyDownEventOnWrapper,增加 keydown 事件在 wrapper 上,增加 closeByOutSideClickEvents,配置点击关闭事件,之前写死的 click

以上修改都是在集团 lowcode-engine 里修复问题时发现的修复项,lowcode-engine 也在 document.body 上监听了 keydown 事件,如果 dialog/overlay 也在 document.body 上监听 esc 将无法拦截 esc 事件。

wukidy avatar Sep 08 '22 02:09 wukidy

以上修改都是在集团 lowcode-engine 里修复问题时发现的修复项

有该问题的相关链接吗,想看一下。

siyou avatar Sep 11 '22 09:09 siyou

这个放到 1.27 beta 里面发布

  1. docs/dialog/index.md 里面新增的 api 需要补充一下
  2. 这个 feature 的单测 case 需要补充一下

lakerswgq avatar Sep 14 '22 09:09 lakerswgq

我读了一遍,全是api的添加,目前没看到对老逻辑有影响的地方,@lakerswgq 可以再看看

bindoon avatar Sep 19 '22 07:09 bindoon

Codecov Report

Base: 90.55% // Head: 90.59% // Increases project coverage by +0.04% :tada:

Coverage data is based on head (c53d0e5) compared to base (2d271b5). Patch coverage: 100.00% of modified lines in pull request are covered.

:exclamation: Current head c53d0e5 differs from pull request most recent head 72fa6e0. Consider uploading reports for the commit 72fa6e0 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4099      +/-   ##
==========================================
+ Coverage   90.55%   90.59%   +0.04%     
==========================================
  Files         305      305              
  Lines       17930    17934       +4     
  Branches     5407     5406       -1     
==========================================
+ Hits        16237    16248      +11     
+ Misses       1672     1665       -7     
  Partials       21       21              
Impacted Files Coverage Δ
src/overlay/overlay.jsx 94.87% <100.00%> (+0.11%) :arrow_up:
src/tab/tabs/nav.jsx 91.89% <0.00%> (-0.07%) :arrow_down:
src/tab/tab.jsx 96.80% <0.00%> (ø)
src/input/group.jsx 100.00% <0.00%> (ø)
src/input/input.jsx 92.23% <0.00%> (ø)
src/input/password.jsx 0.00% <0.00%> (ø)
src/input/textarea.jsx 90.52% <0.00%> (ø)
src/select/base.jsx 83.63% <0.00%> (+1.28%) :arrow_up:
src/dialog/dialog.jsx 97.08% <0.00%> (+3.88%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 19 '22 07:09 codecov[bot]