The cursor position is at the start of the field instead of the end of the field after a call to Context.API.ChangeQuery("...") from inside a plugin
See original GitHub issueDescribe the bug/issue I’m developing a plugin (which target both Flow Launcher and Wox using an abstraction layer for both).
At a certain point in parsing the command, I decide to rewrite the current query from “vol +” to “vol change +”. To do that I use PluginInitContext.API.ChangeQuery(“vol change +”)
(Note: I happen to use the same API for both Wox and Flow Launcher)
Expected result:
- The new query is “vol change +” and the cursor is at the end of the query so any new char typed is inserted at the end of the string
Actual result:
- The new query is “vol change +” but the cursor is at the start of the query so any new char typed is inserted at the start of the string
Notes:
- Under Wox, the cursor is at the end of the query as excepteded.
- While the context is different, the problem may be related to #1070 and/or #1025
- This context may help in solving the problem of the above issues
- I haven’t yet looked at Flow Launcher source code about this problem
Your System:
Microsoft Windows [version 10.0.19043.1586]
Flow Launcher version: 1.9.3
Flow Launcher Error Log: No log is generated during this sequence.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (5 by maintainers)
Top Results From Across the Web
react input cursor moves to the end after update
If the cursor jumps to the end of the field it usually means that your component is remounting. It can happen because of...
Read more >How to position the cursor/caret after inserted inline ...
Hi! I have written a custom visual plugin which allows a user to click a link to insert an inline content control into...
Read more >How to check if cursor is at the end of the line?
What is the function to get line length in which cursor exists. Look at the line() function in the API docs. Something like...
Read more >How to Work With the React Context API
Once that's done, we can import the context and use it to create our provider, which we're calling MyProvider. In it, we initialize...
Read more >React Context API: A deep dive with examples
The React Context API, introduced in React v.16.3, allows us to pass data through our component trees, giving our components the ability to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nice! It works for me. Thanks!
Can you try this build from pr 1074, see if it does solve the issue: https://ci.appveyor.com/api/buildjobs/vune5b0m6mpf6lpd/artifacts/Output%2FPackages%2FFlow-Launcher-Portable.zip