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

fix button touch event when pull up the soft keyboard on web-mobile #6337

Merged
merged 1 commit into from Mar 18, 2020

Conversation

PPpro
Copy link
Contributor

@PPpro PPpro commented Mar 16, 2020

Re: changeLog:

  • 修复移动端,键盘拉起状态,按钮触摸检测失败的问题

@PPpro PPpro requested a review from holycanvas Mar 16, 2020
@@ -533,8 +533,8 @@ let inputManager = {
if (!event.changedTouches) return;
let body = document.body;

canvasBoundingRect.adjustedLeft = canvasBoundingRect.left - (body.scrollLeft || 0);
canvasBoundingRect.adjustedTop = canvasBoundingRect.top - (body.scrollTop || 0);
canvasBoundingRect.adjustedLeft = canvasBoundingRect.left - (body.scrollLeft || window.scrollX || 0);
Copy link
Contributor

@holycanvas holycanvas Mar 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前没测出来?

Copy link
Contributor Author

@PPpro PPpro Mar 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

估计比较难测试出来,键盘拉起状态,把很多按钮遮挡住了

@holycanvas holycanvas requested a review from jareguo Mar 17, 2020
@holycanvas holycanvas merged commit b886c9b into cocos:v2.3.3-release Mar 18, 2020
1 check passed
@PPpro PPpro deleted the 233_touch branch Mar 18, 2020
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.

None yet

2 participants