Skip to content

fix(input-number): don't use this.inputRef when the component is already unmounted #4103

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

Merged
merged 1 commit into from
May 23, 2021

Conversation

CarterLi
Copy link
Contributor

当input-number有焦点的时候,移除组件(unmount)时会首先触发blur事件,但是在blur里面使用了input框的ref,会导致报错。

image

既然用户已经移除了组件,肯定也不会希望收到blur事件。我觉得在ref为空时忽略掉blur事件就可以了


This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

@tangjinzhou tangjinzhou merged commit 5b36b9c into vueComponent:next May 23, 2021
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants