Opened 12 years ago
Closed 10 years ago
#11725 closed Bug (fixed)
[Android][Chrome] Mobile Chrome is not recognize as mobile
| Reported by: | Piotr Jasiun | Owned by: | Szymon Kupś |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 4.5.4 |
| Component: | General | Version: | |
| Keywords: | Android | Cc: |
Description
Tested on CKEditor 4.3.4, Chrome 33 on Android 4.4.2.
CKEDITOR.env look like this:
air: false
chrome: true
cssClass: "cke_browser_webkit cke_hidpi"
gecko: false
hc: false
hidpi: true
iOS: false
ie: false
isCompatible: true
isCustomDomain: function () {
mac: false
mobile: false
needsBrFiller: true
needsNbspFiller: false
opera: false
quirks: false
secure: false
version: 537
webkit: true
So "mobile" is "false" and should be "true".
Change History (9)
comment:1 Changed 12 years ago by
| Keywords: | Android added |
|---|---|
| Status: | new → confirmed |
comment:2 Changed 10 years ago by
| Owner: | set to Szymon Kupś |
|---|---|
| Status: | confirmed → assigned |
comment:4 Changed 10 years ago by
I think that we should not detect mobile devices and we should deprecate env.mobile. That doesn't make sense any more, because tablets are closer to desktops than phones. What's actually interesting for us is screen resolution. Nothing more.
comment:5 Changed 10 years ago by
I think that feature detection is a great concept, but it would not work in our case. On mobile devices we have a different interface: no drag&drop event, not right click, no hover, keyboard may appear. Because of these, some functionality may need additional features. Examples?
- there is no context menu so maybe there should be an additional panel with the context options on mobile,
- there is not hover, so maybe magicline or table resizer should be show more often?
I agree that such features could be designed that way they work on all touch devices, but it is too late to do it in the CKEditor 4, we need only a solutions for mobile without redesigning everything. I agree that mobile android tablet may have a keyboard and mouse and the desktop laptop may have a touchscreen. But the addition features for mobile accessibility will not be an issue even if the user has a keyboard and mouse and will be unnecessary on the desktop.
Talking about the solution I am not sure about the Android && Chrome check. Is not it enough to check if it is Android?
comment:6 Changed 10 years ago by
PJ, you're drifting. There should be a subset of interface which works on desktop and touch devices. That subset should be enough to use the editor. You don't need to know if something is touch device or not. You simply need to handle both kinds of events.
One more thing:
(master dbaaf0b) p@m /www/ckeditor-dev> grep -R env.mobile core/ plugins/ core//env.js: * if ( CKEDITOR.env.mobile )
comment:7 Changed 10 years ago by
| Status: | assigned → review |
|---|
Pushed branch:t/11725b.
It adds @deprecated tag to CKEDITOR.env.mobile.
comment:8 Changed 10 years ago by
| Milestone: | → CKEditor 4.5.4 |
|---|
comment:9 Changed 10 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review → closed |
Fixed on master with git:5a583ea.

I did some research and found these articles:
https://developer.chrome.com/multidevice/user-agent
http://googlewebmastercentral.blogspot.com/2011/03/mo-better-to-also-detect-mobile-user.html
Conclusion after doing some tests on devices and emulators:
Mobile,AndroidandChromekeywords in UA string.Mobilekeyword but includeAndroidandChromekeywords.Proposed solution:
mobilekeyword is present.AndroidandChrome/[.0-9]*patterns are matched.Pushed branch:t/11725