Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

quick and dirty scrollwheel fallback on contacts list for browser users

  • Loading branch information...
commit ff486899c97f51d0e63b53a2be682bc3123ae994 1 parent b20323a
Dean Landolt authored

Showing 1 changed file with 14 additions and 1 deletion. Show diff stats Hide diff stats

  1. +14 1 apps/dialer/js/contacts.js
15 apps/dialer/js/contacts.js
@@ -480,5 +480,18 @@ window.addEventListener('load', function contactSetup(evt) {
480 480 document.getElementById('contact-details-container').addEventListener('click', function(evt) {
481 481 evt.stopPropagation();
482 482 });
483   -
  483 +
  484 + // add scrollwheel fallback for browser users
  485 + var scrollNode = Contacts.view;
  486 + scrollNode.addEventListener('DOMMouseScroll', wheel, false);
  487 +
  488 + function wheel(evt){
  489 + var s;
  490 + if (!evt) {
  491 + s = -window.event.wheelDelta;
  492 + } else {
  493 + s = evt.detail;
  494 + }
  495 + scrollNode.scrollTop += 10 * ((s > 0) ? 1 : -1);
  496 + }
484 497 });

2 comments on commit ff48689

Etienne Segonzac

I'm not sure about this...

@vingtetun what's your take on browser-specific fallback like this?

Dean Landolt
Owner

yeah, this is pretty awful, i was just frustrated by broken scrolling...i suspect i can find a way to hide the native scrollbar but still allow the scrollwheel, but google had come up blank

that said, i'm curious what @vingtetun says about browser-specific fallbacks -- i don't see why this can't work nicely on ff...i could even envision a plugin that implements mozTelephony by way of skype, gtalk, or any other number of vendors. no sense in ruling it out, at least

Please sign in to comment.
Something went wrong with that request. Please try again.