-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
textfield.setFocus has no effect while opening a page #439
Comments
Hi. Are you testing if hardware keyboard attached? If yes, disable it. On-screen keyboard won't show when it is attached. |
How can we disable it? |
It is an option in simulator (Hardware -> Keyboard -> Connect hardware keyboard). If it's a device you have turn off the keyboard. |
We are not doing the testing on the simulator, we are doing the testing live on an iPhone. Sry for the missunderstanding. But even if we remove the hardware keyboard in the simulator it doesnt work there. It seems like the 'textfield.setFokus' ist not translated in something like [textfield becomeFirstResponder]. |
It seems that setFocus doesn't work if it's invoked just after creating the control. Can you delay invoking this method (like set time and then use it)? |
I tried it unfortunately it doesn't work.. Do you know another possibility? |
Unfortunately no. We will fix it in July's release. |
Ok thanks very much. |
Can you open separate issue for this? It will be easier to track. |
Hello, |
I can reproduce the issue. |
When do you resolve this problem? |
AnalysisThis is a bug in the iOs client. The client sets the focus into the text field correctly when creating the page. After the UI is created the page sets the focus on itself (PageViewController -viewDidAppear). A new build of the iOs client will be required to fix the issue. WorkaroundNo known workaround. SnippetsOne can use these pages to reproduce the issue: public class TopLevelPage extends AbstractPage {
@Override
public void createContent(final Composite parent, PageData data) {
Button button = new Button(parent, SWT.PUSH);
button.setText("Open page");
button.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
getUI().getPageOperator().openPage("page");
}
});
}
}
public class Page extends AbstractPage {
@Override
public void createContent(final Composite parent, PageData data) {
parent.setLayout(new GridLayout(1, false));
Text text = new Text(parent, SWT.BORDER);
text.setFocus();
}
} |
This has been fixed, pending review. |
Hello we want to open the keyboard when we open the page. With Android we setFocus on the textfield but with iOS it doesn't work. Is there an option for iOS that the keyboard occurs immediately?
The text was updated successfully, but these errors were encountered: