You can clone with
HTTPS or Subversion.
Prior to 1.7.2 $.support.touch was being set in jquery.mobile.support.js.
But it's gone. Vanished without a trace.
Problem is, third-party plugins need it. Yes, they can work-around, but this seems rather fundamental. A test is done in events/touch.js Why not put it somewhere accessible so that third-party plugins can make sure they are using the same test as JQM?
Can this be put back?
It's still referenced in the scrollview plugin. I realize scrollview is deprecated. Either the support option should be put back or scrollview should be dropped, since it's now broken without this support variable.
$.support is not part of jQuery's public API. As the documentation says: "Since jQuery requires these tests internally, they must be performed on every page load. Although some of these properties are documented below, they are not subject to a long deprecation/removal cycle and may be removed once internal jQuery code no longer needs them."
Yes, I know. And disagree. Strongly.
The test is already being done. It's already being stored in a variable. Just not one that is accessible. What was the purpose of removing it?
If you follow the jQuery documentation to the letter, jQuery (Mobile) still requires this test internally.
"may be removed once internal jQuery code no longer needs them.
The jQuery (Mobile) code still needs it. Thus, it does not meet the criteria for removal.
Further, I dont' think that "they are not subject to a long deprecation/removal cycle" should be interpreted as "they shall be subject to the shortest possible deprecation/removal cycle."
It just stopped exposing it. For no reason.
Unless the reason is to discourage and break third-party plugins.
The scrollview widget you're referring to is an experiment and is neither maintained nor supported.
When we decoupled the touch event code we realized that $.support.touch was only used by touch.js that's why we stopped exposing it.
@jtara - we're reviewing this change now, stay tuned.
After discussing, we've decided to restore $.support.touch to avoid breaking existing code but we're going to document that developers should move away from using this since it's not guaranteed to be there in the future.
We're going to add $.mobile.supportsTouch to the mobile API which that we will commit to supporting as a stable part of the API and recommend that folks use that instead.
Sound good @jtara?
This sounds like a good resolution.
The quasi-supported/quasi-unsupported nature of $.support has always been unsettling. But that is a jQuery issue. jQuery needs to get off the fence.
It makes sense for jQuery Mobile to not pollute $.support. JQM support variables belong in $.mobile somewhere.
This resolution gives time to third-party developers to remove their use of $.support, while at the same time providing a supported feature variable. It is important for plugins to be able to know what features JQM understands the browser to have, so that they can match that expectation.
Introduced $.mobile.supportsTouch as a supported API and resuscitated…
… $.support.touch though it is still unsupported.
The new property is actually $.mobile.support.touch