Comments (13)
I've just tested it by adding these two lines in password
example:
Works great! You probably want to start handling the Tab key event in places like use_editable
too, so it insert a \t
for Input & Textarea.
from freya.
Ah yeah, I was just too lazy to make the onkeydown
handler hahaha.
That was a really fast fix! Thank you for the awesome work!
from freya.
Ah so it's not that it's not listened. It's used to detect navigation within the app
freya/crates/renderer/src/event_loop.rs
Lines 147 to 148 in 1b1eb3e
This prevented tab being treated as a real key input 😢
from freya.
Ah so it's not that it's not listened. It's used to detect navigation within the app
freya/crates/renderer/src/event_loop.rs
Lines 147 to 148 in 1b1eb3e
This prevented tab being treated as a real key input 😢
Yeah... I am aware of this but I haven't found a decent way yet to detect when to do one thing or another
I have thought about doing it with the Dioxus event propagation system but haven't tried yet
from freya.
Let me try
from freya.
I made the keyboard navigation only work if the highest onkeydown
doesn't stop the propagation of the event
It's not perfect but I think it's better
from freya.
Actually the PR is not entirely correct
from freya.
Yeah the PR is more like allowing tab key event to go through & perform navigation at the same time. (I'm just guessing, I'm not really familiar with freya codebase haha)
I think it's closer to the behaviour on the web that way since the JS way is to allow tab key & navigation to happen at the same time & you should call event.preventDefault()
if you don't want navigation to happen.
from freya.
I have come up with a prevent_navigation
method for the use_focus
hook which should indeed prevent any navigation no matter where you call it from
from freya.
I have yet to actually test it but I think it should work
from freya.
You can then support indenting lines in valin editor! 😄
from freya.
I've just tested it by adding these two lines in
password
example:Works great! You probably want to start handling the Tab key event in places like
use_editable
too, so it insert a\t
for Input & Textarea.
Heads up: prevent_navigation is meant to be used inside of onkeydown
events 😄.
I will add some docs and tests asap!
from freya.
You can then support indenting lines in valin editor! 😄
yeees! 🤣
from freya.
Related Issues (20)
- bug: Cached assets are not stored in the Root Scope HOT 5
- enhancement: `ResizableContainer` component
- enhancement: `Tab` and `Tabsbar` components
- enhancement: Support nested routes in `ActivableRoute`
- enhancement: Replace selected text with the new insert in `TextEditor` HOT 1
- enhancement: Transaction-like grouping of `EditorHistory` changes
- enhancement: Use `garde` in `use_form`
- enhancement: Tree builder utilities for components
- enhancement: Also draw wireframe over hovered element in devtools besides the one selected
- enhancement: Adjust `Graph` with the current scale factor
- enhancement: Signal-based reactivity for `use_canvas`
- bug: `on_setup` never invoked in LaunchConfig.
- issue: Unexpected layout HOT 2
- enhancement: Vertical align for text HOT 1
- enhancement: Only emit keydown events after window focus event
- idea: Canvas snapshots for testing
- enhancement: Cursor style
- enhancement: Add text selection to EditorHistory
- enhancement: Click an element to focus it in the devtools
- enhancement: Change scroll wheel direction based on the scroll view direction
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 freya.