From 8ec86a6b1f8774eb492f3c69860ed25a206d85bb Mon Sep 17 00:00:00 2001 From: Kenaniah Cerny Date: Sat, 1 Apr 2017 02:57:01 -0700 Subject: [PATCH 1/2] buttons should not blur after click --- components/button/button.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/button/button.tsx b/components/button/button.tsx index 1fcf922498..f80477bb8e 100644 --- a/components/button/button.tsx +++ b/components/button/button.tsx @@ -1,6 +1,5 @@ import React from 'react'; import classNames from 'classnames'; -import { findDOMNode } from 'react-dom'; import Icon from '../icon'; import omit from 'omit.js'; @@ -119,7 +118,6 @@ export default class Button extends React.Component { // Handle auto focus when click button in Chrome handleMouseUp = (e) => { - (findDOMNode(this) as HTMLElement).blur(); if (this.props.onMouseUp) { this.props.onMouseUp(e); } From ed434c57e9f542ca24e74ddf7e3df409bd78be19 Mon Sep 17 00:00:00 2001 From: Kenaniah Cerny Date: Sat, 1 Apr 2017 04:06:34 -0700 Subject: [PATCH 2/2] improves link navigation --- components/form/demo/normal-login.md | 4 ++-- components/form/demo/register.md | 2 +- components/style/core/base.less | 4 ++++ site/theme/static/common.less | 3 +++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/components/form/demo/normal-login.md b/components/form/demo/normal-login.md index a8dbe9d7a9..085a082519 100644 --- a/components/form/demo/normal-login.md +++ b/components/form/demo/normal-login.md @@ -51,11 +51,11 @@ class NormalLoginForm extends React.Component { })( Remember me )} - Forgot password + Forgot password - Or register now! + Or register now! ); diff --git a/components/form/demo/register.md b/components/form/demo/register.md index 3cce0d3eb4..cf911ef9c3 100644 --- a/components/form/demo/register.md +++ b/components/form/demo/register.md @@ -212,7 +212,7 @@ class RegistrationForm extends React.Component { {getFieldDecorator('agreement', { valuePropName: 'checked', })( - I have read the agreement + I have read the agreement )} diff --git a/components/style/core/base.less b/components/style/core/base.less index bf0c4548ad..00eda43731 100644 --- a/components/style/core/base.less +++ b/components/style/core/base.less @@ -61,6 +61,10 @@ a { cursor: pointer; transition: color .3s ease; + &:focus { + text-decoration: underline; + } + &:hover { color: @link-hover-color; } diff --git a/site/theme/static/common.less b/site/theme/static/common.less index dc819374b5..cf84c1aa44 100644 --- a/site/theme/static/common.less +++ b/site/theme/static/common.less @@ -20,6 +20,9 @@ body { a { transition: color .3s ease; + &:focus { + text-decoration: underline; + } } .main-wrapper {