From 3bd3da48a3ebc93251abd33a25b3ceef42a6bff2 Mon Sep 17 00:00:00 2001 From: Jason Quense Date: Tue, 29 Mar 2016 15:33:05 -0400 Subject: [PATCH] [fixed] SelectList was too forceful refocusing --- dev/dev.jsx | 22 ++++++++++++++-------- src/SelectList.jsx | 7 ++----- src/less/selectlist.less | 1 + 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/dev/dev.jsx b/dev/dev.jsx index 8a920f40e..d4b5fa767 100644 --- a/dev/dev.jsx +++ b/dev/dev.jsx @@ -15,7 +15,7 @@ var Calendar = require('../src/Calendar.jsx') var DateTimePicker = require('../lib/DateTimePicker') var NumberPicker = require('../src/NumberPicker.jsx') // var ComboBox = require('../src/Combobox.jsx') -// var SelectList = require('../src/SelectList.jsx') +var SelectList = require('../src/SelectList.jsx') // var List = require('../src/List.jsx') require('../src/less/react-widgets.less') @@ -95,13 +95,19 @@ var App = React.createClass({ > add - +
+
+ + +
+ + +
diff --git a/src/SelectList.jsx b/src/SelectList.jsx index 02a907681..6a5fe5c6b 100644 --- a/src/SelectList.jsx +++ b/src/SelectList.jsx @@ -71,10 +71,6 @@ var SelectList = React.createClass({ require('./mixins/RtlParentContextMixin'), require('./mixins/AriaDescendantMixin')(), require('./mixins/FocusMixin')({ - willHandle(focused) { - if (focused) - this.focus() - }, didHandle(focused) { // the rigamarole here is to avoid flicker went clicking an item and // gaining focus at the same time. @@ -381,7 +377,8 @@ function getListItem(parent){ ); - function onMouseDown(e) { + + function onMouseDown() { parent._clicking = true } diff --git a/src/less/selectlist.less b/src/less/selectlist.less index c84cda5fb..b72e814a3 100644 --- a/src/less/selectlist.less +++ b/src/less/selectlist.less @@ -16,6 +16,7 @@ position: relative; min-height: 27px; cursor: auto; + outline: none; padding-left: 5px; > label > input {