profile
viewpoint

ded/script.js 2798

Asyncronous JavaScript loader and dependency manager

fat/bean 1381

an events api for javascript

coinbase/rest-hooks 908

Delightful data fetching for React.

ded/klass 746

a utility for creating expressive classes in JavaScript

cvrebert/lmvtfy 293

LMVTFY: Let Me Validate That For You

ded/valentine 289

JavaScripts Functional Sister

danwrong/loadrunner 272

Simple, flexible and sane JavaScript loader and build tool for browsers.

fat/haunt 244

A module for creating github issue bots

ded/sqwish 204

a node-based CSS compressor

fat/coffin 162

Coffin: The Skeleton Drawer

pull request commentfacebook/react-native

Fix for: You cannot blur a text-input if you tab to it.

Hope that's helpful 🤷‍♀

fat

comment created time in 4 months

pull request commentfacebook/react-native

Fix for: You cannot blur a text-input if you tab to it.

I originally was trying to figure out why _onPress (https://github.com/facebook/react-native/blob/96333d09938d1a3118589fd5a0f390303d19390e/Libraries/Components/TextInput/TextInput.js#L1106) was working, while _onFocus wasn't (specifically when _onFocus is triggered by something like a tab event. That lead me to _onPress calling the this.focus method exposed by the NativeMethodsMIxin.

In trying to figure out what focus() did - I got as far as this code: (https://github.com/facebook/react-native/blob/96333d09938d1a3118589fd5a0f390303d19390e/Libraries/Renderer/shims/NativeMethodsMixin.js#L14) and then kinda through my hands up (unclear to me what is happening under the hood by calling focus? I might just not be familiar enough with the project to know where that code lives, but from my quick look - seemed like it was something obfuscated.

Because of that, the first thing I thought to do then was… "what if i just called this focus mixin method when focus is triggered" (such as by a tab event). This seems to work for my usecase - although again - unclear if this is the way this issue should be resolved.

fat

comment created time in 4 months

pull request commentfacebook/react-native

Fix for: You cannot blur a text-input if you tab to it.

Signed, thanks 🙏

fat

comment created time in 4 months

PR opened facebook/react-native

Fix for: You cannot blur a text-input if you tab to it.

Summary

I've been working on a new iOS experience with lots of text inputs and this has been driving me a bit nuts…

If you're in a scrollview with keyboardShouldPersistTaps="handled" and you tab through your text-inputs, you aren't able to tap outside of a given text-input to blur it (and dismiss the keyboard).

I wrote up a quick explanation and some repo steps here: https://snack.expo.io/BJBcKgrqB

The patch i came up with, after poking around for a little bit seems terrifying - so almost certainly not it. But if it's helpful at all - decided to just got ahead and submit it.

Changelog

[iOS] [Fixed] - TextInput blur when tabbing in iOS simulator.

Test Plan

I tried to think of a way to test this in jest… but i didn't get very far sorry 😢

I did create a snack here so you can demo the issue: https://snack.expo.io/BJBcKgrqB

I also created two videos…

Here's the text input not working when i try to blur it after tabbing in simulator ezgif-1-dc85b405c760

Here's it working after I applied this patch ezgif-1-ed9f6b19653d

Thanks!

+1 -0

0 comment

1 changed file

pr created time in 4 months

push eventfat/react-native

Jacob Thornton

commit sha 96333d09938d1a3118589fd5a0f390303d19390e

Fix for: You cannot blur a text-input if you tab to it. Steps to reproduce: https://snack.expo.io/BJBcKgrqB

view details

push time in 4 months

create barnchfat/react-native

branch : fat/persist-ability-to-blur-on-tab

created branch time in 4 months

fork fat/react-native

A framework for building native apps with React.

https://facebook.github.io/react-native/

fork in 4 months

more