question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide API to set focus on widget

See original GitHub issue

tabris.js should provide API to set the input focus on a specific widget. For example

var input = tabris.create( "TextInput", { ... } );
input.focus();
// or
page.set( "focus", input );

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
bFloodcommented, Mar 21, 2016

any word on this? we have a lot of users who want textviews to receive focus immediately (so the keyboard appears automatically ). Tapping them to receive focus is not a huge effort but for text entries that are used all the time, that one extra steps adds up quickly

thanks

1reaction
ralfstxcommented, Jun 7, 2016

@tbuschto brought up the question why we don’t implement it as a property, e.g. widget.set('focused', true). A property would also allow to query the focused state of a widget. It would be an interactive property, i.e. it can change on the client. Also focusing one widget would reset another widget’s focused state. However, thinking about tabs or radio buttons, this behavior doesn’t seem uncommon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how focus a widget on screen? - GIS Stack Exchange
So I need focus a widget when it's opened. The first time that widget it's open, automatically set focus, but the second time...
Read more >
Set focus to the first widget - c++ - Stack Overflow
You can use the QWidget::nextInFocusChain method to retrieve the first widget that must receive the focus.
Read more >
Focus class - widgets library - Flutter - Dart API docs
This example shows how to wrap another widget in a Focus widget to make it focusable. It wraps a Container, and changes the...
Read more >
Focus on a widget annotation - PSPDFKit
A: You can set the focus on a widget annotation programmatically using the DOM API. The next example adds a custom toolbar item...
Read more >
UWidget::SetFocus - Unreal Engine Documentation
Sets the focus to this widget for the owning user.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found