You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/10/28 13:58:06 UTC
[incubator-echarts] 01/03: fix(state): fix focus may not be able to
reset bug.
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch fix-test
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit 3668e0a82d866d491da2a695924e3db4a3bf4797
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Oct 28 21:17:48 2020 +0800
fix(state): fix focus may not be able to reset bug.
---
src/util/states.ts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/util/states.ts b/src/util/states.ts
index eeff7ab..e34d6df 100644
--- a/src/util/states.ts
+++ b/src/util/states.ts
@@ -581,8 +581,8 @@ export function enableHoverEmphasis(el: Element, focus?: InnerFocus, blurScope?:
}
export function enableHoverFocus(el: Element, focus: InnerFocus, blurScope: BlurScope) {
+ const ecData = getECData(el);
if (focus != null) {
- const ecData = getECData(el);
// TODO dataIndex may be set after this function. This check is not useful.
// if (ecData.dataIndex == null) {
// if (__DEV__) {
@@ -594,6 +594,9 @@ export function enableHoverFocus(el: Element, focus: InnerFocus, blurScope: Blur
ecData.blurScope = blurScope;
// }
}
+ else if (ecData.focus) {
+ ecData.focus = null;
+ }
}
const OTHER_STATES = ['emphasis', 'blur', 'select'] as const;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org