Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image: fix keyboard events handling logic #18416

Closed
wants to merge 1 commit into from
Closed

image: fix keyboard events handling logic #18416

wants to merge 1 commit into from

Conversation

Mookiepiece
Copy link

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow Element's contributing guide (中文 | English | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer relative issues for you PR.

close #18393

  1. main.vue line 221, manipulating document.body.style directly is not good, and events may propagate to a parent which are not body element, and still cause scrolling, so I use e.stopPropagation() on key events to stop scrolling instead of Image: Fix shield the page when preview big image (#16796) #16997.

  2. image-viewer.vue line 295:

mounted() {	
  this.deviceSupportInstall();	
  this.$refs['el-image-viewer__wrapper'].focus();	
}

the mounted function only called once, cause reopen the image-viewer, all keyboard events and mouse scale events are not allowed. so add an prop 'visible' to solve this case.

@element-bot
Copy link
Member

element-bot commented Dec 14, 2019

Deploy preview for element ready!

Built with commit a5fb703

https://deploy-preview-18416--element.netlify.com

@Mookiepiece
Copy link
Author

@luckyCao

@DevBrent
Copy link

DevBrent commented Dec 19, 2019

@luckyCao This resolves #18234

@Mookiepiece Thank you for not only finding this but correcting the original issue while rectifying such a major regression!

@luckyCao
Copy link
Contributor

luckyCao commented Apr 8, 2020

#19075

@luckyCao luckyCao modified the milestones: 2.13.1, 2.14.0 Apr 10, 2020
@luckyCao
Copy link
Contributor

@Mookiepiece this pr can't prevent body scroll

@Mookiepiece
Copy link
Author

@luckyCao oh sorry, I should use preventDeafult instead

@Mookiepiece
Copy link
Author

whatever, welcome back~❤

@Mookiepiece
Copy link
Author

already fixed by others. 2.13.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] 点击el-image渲染的图片后将使得页面无法滚动。
4 participants