@samitouri / QOS-React / commits / eb705d1448

Fix autofocus for input and textarea (#6986)

Jim committed Jun 7, 2016 at 12:50 UTC eb705d144849e39662c95e2c68f4ece428edf32d
1 file changed +19
src/renderers/dom/shared/ReactDOMComponent.js
+19
@@ -661,14 +661,33 @@ ReactDOMComponent.Mixin = {
661 inputPostMount,
662 this
663 );
664 + if (props.autoFocus) {
665 + transaction.getReactMountReady().enqueue(
666 + AutoFocusUtils.focusDOMComponent,
667 + this
668 + );
669 + }
670 break;
671 case 'textarea':
672 transaction.getReactMountReady().enqueue(
673 textareaPostMount,
674 this
675 );
676 + if (props.autoFocus) {
677 + transaction.getReactMountReady().enqueue(
678 + AutoFocusUtils.focusDOMComponent,
679 + this
680 + );
681 + }
682 break;
683 case 'select':
684 + if (props.autoFocus) {
685 + transaction.getReactMountReady().enqueue(
686 + AutoFocusUtils.focusDOMComponent,
687 + this
688 + );
689 + }
690 + break;
691 case 'button':
692 if (props.autoFocus) {
693 transaction.getReactMountReady().enqueue(