0

Annoying issue and I've tried several javascript/jquery/plug-ins and nothing has worked. Went through numerous trials with this SO link: Prevent scrolling of parent element?

Here's an example:

https://livedemo00.template-help.com/woocommerce_53307/checkout/

note: you have to add a demo product to the cart to get to this page..

If you notice on the Country drop-down select option box, if you try to use the scroll wheel within it, it just resorts to scrolling the parent window. Scrolling isn't working at all for me within the drop down box.

I wish I could provide some sample code, but nothing has even remotely worked.

How do I enable scrolling in the Select2 Drop Down box?

Community
  • 1
  • 1
Brian Bruman
  • 883
  • 12
  • 28
  • Have you tried the solution [Prevent scrolling of parent element?](http://stackoverflow.com/questions/5802467/prevent-scrolling-of-parent-element) with the `:focus` – Thennarasan May 13 '17 at 04:57
  • I'm not seeing that one.. I know I tried at least a few on that page. If I do a CTRL + F for 'focus' I'm not finding anything. Which user wrote the comment you're referring to? – Brian Bruman May 13 '17 at 05:31
  • 1
    you are using https://github.com/simov/simplr-smoothscroll ,this is creating problem. without this scroll plugin everything works perfectly – Deep 3015 May 13 '17 at 05:41
  • Yes! You deserve credit for the answer. I removed this js from the page and it's working as it should now. Thank you you saved me a lot of time and frustration trying to figure this out! – Brian Bruman May 13 '17 at 13:32

1 Answers1

0

Solution thanks to @Deep-3015

There was a javascript confliction between simplr-smoothscroll and select2 causing the error.

Here's what I did (I'm using WordPress here) to make sure smoothscroll did not load on the checkout page.

add_action('wp_enqueue_scripts', 'my_deregister_javascript');

function my_deregister_javascript() {
  if (is_page('checkout')) {
    wp_deregister_script('smoothscroll');
  }
}

Refreshed and it is working perfectly!

Brian Bruman
  • 883
  • 12
  • 28