Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16534] MobileWeb: MouseWheel does not work on MobileWeb, Firefox and IE

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-03-24T01:38:18.000+0000
Affected Version/sRelease 3.2.1
Fix Version/s2014 Sprint 06, 2014 Sprint 06 Tooling, Release 3.3.0
ComponentsMobileWeb
Labelsmobileweb, qe-testadded
ReporterAndrew Greenstreet
AssigneeChris Barber
Created2014-02-06T19:05:15.000+0000
Updated2014-06-19T12:42:34.000+0000

Description

Mousewheel code is developed to only support chrome and safari. Does not contain the correct code for Firefox or IE. Fixed in this pull request: https://github.com/appcelerator/titanium_mobile/pull/4968

Comments

  1. Ritu Agrawal 2014-02-07

    Thank you for submitting this pull request. It appears that this pull request includes multiple improvements and fixes. Please submit one pull request for one issue. We would also need a test case that we can use to validate your issue and the fix. http://docs.appcelerator.com/titanium/latest/#!/guide/Pull_Request_Guide
  2. Ritu Agrawal 2014-02-17

    Please let us know if you plan to submit a single pull request for this change.
  3. Neeraj Gupta 2014-02-24

    Our Mobile Web platform targets mobile browsers and is neither supported nor optimized for Desktop browsers. Given that MouseWheel functionality is specific to Desktop browsers, we do not plan to add this functionality. Thanks for your contributions.
  4. Andrew Greenstreet 2014-02-24

    That is NOT true. You already have the mouse wheel functionality in there for Safari, & Chrome, this patch just fixed it for Firefox and IE. Please look at line 172 of your code and tell me what you see? https://github.com/appcelerator/titanium_mobile/blob/master/mobileweb/titanium/Ti/_/UI/KineticScrollView.js I see:
       	// Handle mouse wheel scrolling
       enableMouseWheel && (this._disconnectMouseWheelEvent = on(self.domNode, "mousewheel",function(e) {
       if (self.scrollingEnabled) {
       self._cancelAnimations();
       var distanceX = contentContainer._measuredWidth - self._measuredWidth,
       distanceY = contentContainer._measuredHeight - self._measuredHeight,
       currentPositionX = -self._currentTranslationX,
       currentPositionY = -self._currentTranslationY;
       
       setMinTranslations();
       
       // Start the scrollbar
       self._startScrollBars({
       x: currentPositionX / distanceX,
       y: currentPositionY / distanceY
       },
       {
       x: self._measuredWidth / contentContainer._measuredWidth,
       y: self._measuredHeight / contentContainer._measuredHeight
       });
       
       // Set the scroll position
       self._setTranslation(Math.min(0, Math.max(self._minTranslationX,-currentPositionX + e.wheelDeltaX)),
       Math.min(0, Math.max(self._minTranslationY,-currentPositionY + e.wheelDeltaY)));
       
       clearTimeout(scrollbarTimeout);
       scrollbarTimeout = setTimeout(function(){
       self._endScrollBars();
       },500);
       
       self._handleMouseWheel && self._handleMouseWheel();
       }
       }));
       
  5. Andrew Greenstreet 2014-02-24

    I reopened a clean pull request for this issue. Use it if you would like. https://github.com/appcelerator/titanium_mobile/pull/5369
  6. Neeraj Gupta 2014-02-24

    Reopening this ticket as we do support MouseWheel for Chrome and Safari, but not Firefox because they invented their own API a long time ago. While Appcelerator does NOT officially support desktop browsers including Firefox, it is recognized that desktop browsers are used for developing Mobile Web apps. Because of this, we would reevaluate this PR.
  7. Andrew Greenstreet 2014-02-24

    Thanks. I'm not sure I could make it through development without firebug, and firebug is only available for Firefox. Incidentally, even though you don't "officially" support desktop, with the exception of a mousewheel, I can't really see what is different. We are currently building the Android & Web (yes, web desktop) versions of FindingRover.com using Titanium (ios is currently native and on the app store). With the exception of bugs that exist across all browsers (mobile and desktop) we really haven't encountered anything that is desktop specific. The only desktop specific things I can think of were mouse pointers (which were easily fixed) and mousewheel. So far Ti MobileWeb is working great for a our desktop version. Another benefit of the web version, is I can build a piece of functionality, compile in about 7 seconds and test. Nine times out ten, that code ports right back into the Android version. I can't begin to tell you just how valuable the web version of TI is; I'm saving literally 2 hours a day not having to compile to Android to test everything.
  8. Neeraj Gupta 2014-02-24

    Good to hear. You have submitted a number of tickets and pull requests over last few weeks and we will make sure that they get due attention. Thanks for your help.
  9. Ritu Agrawal 2014-03-03

    Moving this ticket to engineering to evaluate this PR in the context of this ticket.
  10. Eric Merriman 2014-05-08

    What is the PR for this? Can't seem to track down if anything was merged.
  11. Chris Barber 2014-05-08

    [~emerriman] Read a few comments up and you'll see the PR is https://github.com/appcelerator/titanium_mobile/pull/5369.
  12. Olga Romero 2014-05-29

    Tested and verified as fixed using Mac osx 10.9.3 Mavericks Windows7, Windows8 Appcelerator Studio, build: 3.3.0.201405271647 Titanium SDK, build: 3.3.0.v20140528144113 Node.JS Version: v0.10.13 NPM Version: 1.3.2 acs@1.0.14 alloy@1.4.0-beta npm@1.3.2 titanium@3.3.0-beta titanium-code-processor@1.1.1

JSON Source