How to bring up mobile keyboard in chrome dev tools?

£可爱£侵袭症+ 提交于 2019-11-27 18:04:19

问题


I'm trying to test which keyboard type comes up by default for certain inputs on iOS and Android. Is there a way to bring up the on screen keyboard in Chrome devtools phone simulator?

So far I have tested the iOS version of my website by running the xcode simulator and pointing to my website but it would be really convenient to use devtools.

Thanks!


回答1:


Update: 🙁 Virtual keyboard support is deprecated in Chrome 68+; this answer no longer works.


Original answer

You can view the standard keyboard for the Nexus 5X device for the portrait or landscape view:

However, you can't interact with it, nor does it change based on the context it is called from. I found by inspecting DevTools that it is simply an image file overlayed onto an SVG. There's nothing smart going on with these profiles. It's just useful to look at how the app responds to the reduced space.

To test the proper behaviour of keyboards with context, I would just recommend using XCode and Android emulators, or better still use real devices.

See: Test Responsive and Device-specific Viewports



来源:https://stackoverflow.com/questions/38386215/how-to-bring-up-mobile-keyboard-in-chrome-dev-tools

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!