[Bug] Select menu is slightly broken on touch screens

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
The way it's meant to be

Nao

  • Dadman with a boy
  • Posts: 16,082
[Bug] Re: Select menu is slightly broken on touch screens
« Reply #1, on March 17th, 2012, 09:26 PM »
Which is why iPhones get a much higher size. To avoid the bars.
I don't remember if I added this for tablets as well.
I dunno how a scrollbqr is supposed to be used on a touch device.

Should really create a bug board now... ;)

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Bug] Re: Select menu is slightly broken on touch screens
« Reply #5, on March 18th, 2012, 08:24 PM »
I have noticed, though, that it is possibly to trip up the selectbox on things like the jumpto if you happen to have it near the bottom of the page and a lot of boards - and it's not possible to scroll on an iPod touch (or if it is, I haven't figured out how)

Nao

  • Dadman with a boy
  • Posts: 16,082
[Bug] Re: Select menu is slightly broken on touch screens
« Reply #6, on March 18th, 2012, 10:41 PM »
I don't think it's possible toake it scroll. We mentioned that elsewhere today iirc. The solution is to avoid restraining height but I haven't got time to work on the select box right now.
As for tripping up you mean having it cut off on the right yeah? It's also another thing I always forget to fix. It's easy enough, I just need to reduce the left margin by the same amount of pixels.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278

Nao

  • Dadman with a boy
  • Posts: 16,082
[Bug] Re: Select menu is slightly broken on touch screens
« Reply #8, on March 19th, 2012, 07:01 AM »
It happens in the admin area mostly.
As for what you describe. How's this a bug? Wedge shows the a dropup instead of a dropdown so that it doesn't get cropped..

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Bug] Re: Select menu is slightly broken on touch screens
« Reply #9, on March 19th, 2012, 07:41 AM »
Quote from Nao on March 18th, 2012, 10:41 PM
I don't think it's possible toake it scroll. We mentioned that elsewhere today iirc. The solution is to avoid restraining height but I haven't got time to work on the select box right now.
As for tripping up you mean having it cut off on the right yeah? It's also another thing I always forget to fix. It's easy enough, I just need to reduce the left margin by the same amount of pixels.
It'll require some tricky scrolling code to make it scrolling, can't you drop the HTML from options when using the native select?
[Bug] Re: Select menu is slightly broken on touch screens
« Reply #10, on March 19th, 2012, 03:47 PM »
This isn't exactly ideal, and it will lag a lot on touch devices. But it scrolls

Code: (At the end of ScrollBar function in sbox.js) [Select]
$dd[0].addEventListener('touchmove', function (e)
{
scrollTo(startPos - e.touches[0].pageY + iTouch);
e.preventDefault();
});
$dd[0].addEventListener('touchstart', function (e)
{
iTouch = e.touches[0].pageY;
startPos = parseInt($thumb.css('top') || 0);
});

Nao

  • Dadman with a boy
  • Posts: 16,082
[Bug] Re: Select menu is slightly broken on touch screens
« Reply #11, on March 30th, 2012, 03:09 PM »
Never got around to replying that post...
I'm still unsure what to do about this. I'm always against forcing every single browse to load code that it will never need. (Just like I'm not cool about forcing them to load ARIA stuff they'll never use either, but that's a bit harder to detect than a browser version...)

I'd like to get some opinions on this.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Bug] Re: Select menu is slightly broken on touch screens
« Reply #12, on March 30th, 2012, 03:12 PM »
This problem is only going to get worse as touch-capable desktops become more prevalent, so I'd be inclined to implement it like that and run with it. (Though I realise it's not the best solution.)

Nao

  • Dadman with a boy
  • Posts: 16,082
[Bug] Re: Select menu is slightly broken on touch screens
« Reply #13, on March 30th, 2012, 03:19 PM »
It's just that, I like having my dropdown without any scrollbar. I find this more natural... More natural, even, than the iOS implementation.
Posted: March 30th, 2012, 03:19 PM

BTW, only 5 commits left before we reach 300 commits (together) for the first quarter :)
We've already broken our record by far, anyway!

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Bug] Re: Select menu is slightly broken on touch screens
« Reply #14, on March 30th, 2012, 03:21 PM »
Hmm, iOS' implementation is pretty natural, as it only shows you the scrollbar as you're scrolling, but I've wondered if there shouldn't be a visual cue that the selection area is larger than what's currently displayed.

And woohoo! 2012 is very definitely shaping up to be a helluva year for both of us!