I thought it should return Tablet in this case.
Anyway, as an alternative, you can add an iframe (or a custom element) to the page and retrieve the device type from the user agent (google it). then post it from the iframe to the parent page and continue from there.