Comments (15)
@theKashey not sure that I describe it correctly, maybe I describe it better in Telegram :D
from react-focus-lock.
This is somehow related toallowTextSelection
prop (#10). This option just allow "not" to have an active element in the lock.
It does not disable autofocus, but you can blur by your self.
https://codesandbox.io/s/oj01rx089y
from react-focus-lock.
Awesome. Thanks!
from react-focus-lock.
Should we change docs?
from react-focus-lock.
Should we change a prop name? :)
from react-focus-lock.
Even more - should it be a single prop, or two?
shouldHaveFocus
, about allowing not to have a focused element. Maybe disabled by default.nofocus
(autofocus=false?), about just blurring the active one on lock activation. As long you (usually) have to press some button to open something with a Lock, so the goal is to remove focus from "not Lock", but not had in Lock.
Proper naming always were a problem.
from react-focus-lock.
I like this plan 👍 especially autobluring :)
from react-focus-lock.
Ok, lets flip a coin - nofocus=true
/autofocus=false
?
from react-focus-lock.
autofocus
is not very clear because it looks like related with autofocus
attribute.
Maybe initialFocus: true|false
?
from react-focus-lock.
For me initialFocus
sounds like a focus "target", not the behaviour.
from react-focus-lock.
focusOnStart
?
from react-focus-lock.
focusOnLock
then, or noautofocus
, looseFocus
, blurred
, dontFocus
. Meh 💩
I should ask my real
english mates.
from react-focus-lock.
They proposed autoFocus=false
as a best property name.
The bad thing - currently allowTextSelection
disables that autofocus, and letting you not have a focus inside, doing all the things in a same time, and has to be refactored.
from react-focus-lock.
@ai - v1.7.0 just got shipped.
See https://github.com/theKashey/react-focus-lock/releases/tag/1.7.0 for details.
PS: just <FocusLock autoFocus={false}>....
from react-focus-lock.
Thanks :) Everything works
from react-focus-lock.
Related Issues (20)
- [feature] add possibility to pass id to the `FocusLock` element HOT 2
- Console warning for react 18 users HOT 1
- react-focus-lock with [email protected] throws when focus taken from cross-origin iframe HOT 4
- Add browser level integration test HOT 1
- preventScroll is affecting scroll inside a modal
- react-focus-lock breaks password managers' autofill features HOT 7
- Socket dev picking up some security issues. HOT 3
- Add an `onError` callback for when focus fighting is detected HOT 2
- Feature request - Clickaway deactivation HOT 2
- `crossFrame={false}` has cross-browser Safari issues HOT 7
- Can't click without scroll being changed HOT 3
- Invalid hook call when using it inside a library HOT 3
- Issue with importing FocusLock component HOT 18
- /*#__PURE__*/ comment throws warning in Rollup HOT 3
- Unclear behavior during loosing focus in unmanaged area HOT 3
- Migrate to Typescript HOT 1
- Remove sidecar HOT 1
- useFocusLock HOT 1
- Version `2.11.0` doesn't compile with TS HOT 1
- Returning focus to element inside an iframe HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-focus-lock.