# Slide in hamburger menu in 'mobile view' only on touchscreen + mouse desktops

**URL:** https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793
**Category:** Development
**Created:** [1월 29, 2019, 5:00오전 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793 "2019-01-29T05:00:01Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [1월 29, 2019, 5:00오전 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/1 "2019-01-29T05:00:01Z")

</div>

When using ‘mobile view’ on a desktop the slide in hamburger menu is unclickable as it slides away when you move towards it. I often use this to test mobile features without having to use a mobile device.

> **[01.28.2019-20.57.35](https://app.screencast.com/0hVJWeFGe6lNe)**
>
> World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [1월 29, 2019, 5:48오전 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/2 "2019-01-29T05:48:12Z")

</div>

How is this a “bug”? How does this prevent normal use of Discourse, per the description of the bug category?

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [1월 29, 2019, 6:04오전 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/3 "2019-01-29T06:04:39Z")

</div>

Maybe because it slides away before I can switch it back to desktop mode? Perpetual mobile view kinda sucks!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [1월 29, 2019, 6:10오전 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/4 "2019-01-29T06:10:08Z")

</div>

So press F12 and switch to a mobile view in the browser?

---

<div class="post-metadata">

### Author: ![some-user](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@some-user](https://meta.discourse.org/u/some-user)
#### Post date: [1월 29, 2019, 6:29오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/5 "2019-01-29T18:29:31Z")

</div>

99% of my users don’t know this functionality.

Currently the “Mobile View” is a trap a user cannot easily escape. Maybe the bug is rather that the “Mobile View” link is offered on a desktop browser?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [1월 29, 2019, 9:55오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/6 "2019-01-29T21:55:12Z")

</div>

I suspect simply resizing the browser window would also work.

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [1월 29, 2019, 10:08오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/7 "2019-01-29T22:08:52Z")

</div>

I’m afraid it doesn’t, and even it if did, @some-user’s point of a user changing this setting would leave them completely lost, yeah I can figure out how to get out of it, but I’m guessing only 1 or 2 of my users would be able to, I think if someone clicked this setting they would view that as a major bug.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [1월 30, 2019, 12:51오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/8 "2019-01-30T12:51:28Z")

</div>

This makes it really hard to use mobile view on any device with a mouse, which is pretty annoying when developing. I moved this topic from #Contribute > Bug to #Development, since it doesn’t affect **most** people’s “normal use”.

I’m sure it didn’t used to be an issue. @featheredtoast any ideas? Maybe related to the ember upgrade?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [1월 30, 2019, 1:00오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/9 "2019-01-30T13:00:16Z")

</div>

What in the name of holy hell are y’all talking about here? 😡 🤬 WHY is this topic still present?

> [@some-user](#):
>
> Currently the “Mobile View” is a trap a user cannot easily escape. Maybe the bug is rather that the “Mobile View” link is offered on a desktop browser?

I see NO link to “Mobile View” anywhere on the desktop. I am on Chrome, Windows 10 right now and there’s zero “Mobile View” selection possible in the hamburger menu or anywhere else.

> [@davidkingham](#):
>
> When using ‘mobile view’ on a desktop the slide in hamburger menu is unclickable as it slides away when you move towards it.

I am using the [F12 developer menu in my browser](https://developers.google.com/web/tools/chrome-devtools/device-mode/) to exercise the mobile view this very second and I have zero issues whatsoever clicking in and out of the mobile slide menus.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [1월 30, 2019, 1:04오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/10 "2019-01-30T13:04:47Z")

</div>

This affects **developers** (hence #Development). It certainly affected me just now.

Sure, you can ‘get around’ the issue by using chrome’s mobile simulator. But when testing mobile things I find it much easier to use `?mobile_view=1`. Try that, without the mobile simulator, and you’ll see how annoying the issue is.

It’s not urgent in the slightest, but would be nice to fix.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [1월 30, 2019, 1:10오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/11 "2019-01-30T13:10:08Z")

</div>

> [@david](#):
>
> Sure, you can ‘get around’ the issue by using chrome’s mobile simulator. But when testing mobile things I find it much easier to use `?mobile_view=1` . Try that, without the mobile simulator, and you’ll see how annoying the issue is.

Doing so makes _zero sense!_ This is the dictionary definition of “Doctor, It Hurts When I Do This”

 ![image](https://global.discourse-cdn.com/meta/original/3X/5/4/54a6d0332b911b49cea84fd4b089d575abd0fc24.jpeg)

Use the [functionality built into the browser to test mobile behaviors!](https://developers.google.com/web/tools/chrome-devtools/device-mode/)

- that’s _exactly why it was created in the first place_
- it’s trivial to enter and exit
- it lets you simulate a slew of mobile devices (and bandwidths!) perfectly

This topic is a colossal waste of everyone’s time. I guess the only good news is maybe people can [**learn to use the proper tools**](https://developers.google.com/web/tools/chrome-devtools/device-mode/) instead of, I don’t know, repeatedly punching themselves in the face and complaining that .. their face kinda hurts? I mean we’re talking about DEVELOPERS here, right? That know how to use TOOLS?

😠

p.s. next time leave the topic deleted

---

<div class="post-metadata">

### Author: ![some-user](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@some-user](https://meta.discourse.org/u/some-user)
#### Post date: [1월 30, 2019, 2:28오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/12 "2019-01-30T14:28:25Z")

</div>

> [@codinghorror](#):
>
> I see NO link to “Mobile View” anywhere on the desktop. I am on Chrome, Windows 10 right now and there’s zero “Mobile View” selection possible in the hamburger menu or anywhere else.

I’m as well, and the link is present in (my) hamburger menu:

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/4/149218c532c107b93510a59f99bfcc2d1dd21fec.png)

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [1월 30, 2019, 3:38오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/13 "2019-01-30T15:38:12Z")

</div>

> [@codinghorror](#):
>
> I see NO link to “Mobile View” anywhere on the desktop. I am on Chrome, Windows 10 right now and there’s zero “Mobile View” selection possible in the hamburger menu or anywhere else.

I tested in four different browsers, logged in, logged out, and they all show it, on meta.

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/4/f43d3333fc02f53aac6c382cf1360d4d6fcf8b7a.png)

IF a user were to click on this they would be stuck in mobile view on their desktop, I was only able to get out because I have a touch screen. This is _not_ the same as pressing F12. It seems as though the mobile view button should go away since only developers would ever need this.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [1월 30, 2019, 3:40오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/14 "2019-01-30T15:40:06Z")

</div>

> [@davidkingham](#):
>
> I tested in four different browsers, logged in, logged out, and they all show it, on meta.

The reason you see it on desktop, and other people don’t, is:

> [@davidkingham](#):
>
> I have a touch screen

We used to show the ‘mobile view’ button for narrow browsers as well, but I think that was removed recently.

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [1월 30, 2019, 3:43오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/15 "2019-01-30T15:43:12Z")

</div>

Gotcha, I actually forgot I had a touch screen since I never use it, but this forced me to use after I realized I was stuck in this view. Seems like it shouldn’t be visible as more and more people have touch screens.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [1월 30, 2019, 8:46오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/17 "2019-01-30T20:46:09Z")

</div>

Ok this is a legit complaint for dual touchscreen and mouse computers then, and I will edit the topic title to make that more clear.

The more surgical fix is not to show this option in that specific (and rare) case. But as I recall it is nearly impossible to detect simultaneous mouse and touchscreen capable devices in the browser.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [1월 30, 2019, 11:54오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/20 "2019-01-30T23:54:31Z")

</div>

> [@codinghorror](#):
>
> The more surgical fix is not to show this option in that specific (and rare) case. But as I recall it is nearly impossible to detect simultaneous mouse and touchscreen capable devices in the browser.

Still basically impossible

> <https://stackoverflow.com/questions/7838680/detecting-that-the-browser-has-no-mouse-and-is-touch-only/18001239#18001239>

[And this](https://codeburst.io/the-only-way-to-detect-touch-with-javascript-7791a3346685)

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/a/fae95ef992914bfc24d9da96389f278597731d98.png)

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [2월 4, 2019, 4:31오후 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/23 "2019-02-04T16:31:54Z")

</div>

This should fix your case here - I’ve improved the event handlers on this so pan events are now only registered on touch events 🍅

[https://github.com/discourse/discourse/commit/9de906ddab3e440ef5ee1e9cf04aa1ae20757d31](https://github.com/discourse/discourse/commit/9de906ddab3e440ef5ee1e9cf04aa1ae20757d31)

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [2월 6, 2019, 2:00오전 UTC](https://meta.discourse.org/t/slide-in-hamburger-menu-in-mobile-view-only-on-touchscreen-mouse-desktops/107793/24 "2019-02-06T02:00:01Z")

</div>

This topic was automatically closed after 33 hours. New replies are no longer allowed.
