Mobile view with touch capabilities on laptop

Hi there,

I’m on a laptop with touch capabilities. In the hamburger-menu, I don’t have the “shortcuts” link, because this one is displayed when

return !Discourse.Mobile.mobileView && !this.capabilities.touch;

But what if i’m on a laptop with touch capabilities and I want to display the desktop version, with shortcuts & everything ?

Thx

1 个赞

@zogstrip I thought you had a fix for this … no?

Nope, it was only for the “grippie” on the composer.

https://github.com/discourse/discourse/commit/ef0804fbb02dfeaa3257ee3f2c290227aa2585a5

1 个赞

将此移至 Contribute > Feature…… 我不确定在 JavaScript 中是否真的有办法检测您是否真的连接了键盘。在此依赖用户代理(user agent)是棘手的。

话虽如此,我预计在未来几年里,越来越多的功能将同时支持键盘和触摸操作。

我在想,如果您使用的是非移动设备,我们是否应该无条件地在汉堡菜单中显示键盘快捷键链接?@codinghorror

不过……有一个简单的变通方法……按下 ?

3 个赞