Skip to content
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

Dismiss keyboard on iOS sometimes fails #65

Closed
bootstraponline opened this issue Jul 12, 2013 · 4 comments
Closed

Dismiss keyboard on iOS sometimes fails #65

bootstraponline opened this issue Jul 12, 2013 · 4 comments
Labels

Comments

@bootstraponline
Copy link
Member

au.lookup('window')[0].tap(); toggles "Select, Select All, Paste" instead of dismissing the keyboard in some situations.

@bootstraponline
Copy link
Member Author

The existing code is the same as mobile :tap. Tapping at the center of the screen (0.5 x 0.5 y) isn't that helpful. It should be more towards the top. For example mobile :tap, x: 0.12, y: 0.21

@bootstraponline
Copy link
Member Author

A better approach is probably to find the textfield on screen, and then tap to the left or right of it.

@bootstraponline
Copy link
Member Author

@bootstraponline
Copy link
Member Author

Swipe will fail if it starts in the boundary of the active textfield.

mobile :swipe, startX: 0.5, endX: 0.5, startY: 0.2, endY: 0.8

seems to work well.

Flicking inside the keyboard types keys and doesn't dismiss.

 execute_script %(au.mainApp.keyboard().flickInsideWithOptions({startOffset: {x:0.5, y:0.2}, endOffset: {x:0.5, y:0.8}}))

# Origin is upper left hand point
execute_script %(au.mainApp.keyboard().rect())
{"origin"=>{"x"=>0, "y"=>264}, "size"=>{"width"=>320, "height"=>216}}

execute_script %(au.mainApp.keyboard().hitpoint())
=> {"x"=>160, "y"=>372}
0, 264            320, 264



0, 480            320, 480

> {"x"=>160, "y"=>372}

264 / 2 + 480 / 2 = 372
0 / 2 + 320 / 2 = 160 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant