1

I have a weird problem... I'm just hoping someone will believe me.

I'm currently working with a platform called K2 where in a form I've injected some jQuery. The script is scrolling a list control to a specific element within that list and works without any problems in Chrome and in IE. But not in Edge (v16.16299), unless I have DevTools open.

This is the function. If I put an alert() before animate() I'm getting it, without having DevTools open... So I guess it has to do something with animate or scrollTop?

$(function() { jQuery.fn.scrollTo = function(elem) { $(this).animate({ scrollTop: $(this).scrollTop() - $(this).offset().top + $(elem).offset().top - 4 }, 500); return this; }; });

scrollTo is then called within a K2-rule):

$("#idOfParent").scrollTo("input[value='aValueImGetting'");

I'm clueless and the closest thing I've found is this, which didn't help me since I can't update Edge due to... stuff: Javascript in Edge only works with devtools open However, the last comment about this being solved from an update is from 2016, and my Edge version is from mid 2017?

TylerH
  • 20,799
  • 66
  • 75
  • 101
  • can you post the Enough code to reproduce the problem as in [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve). – Zhi Lv Sep 26 '19 at 02:53
  • Is the function invoked when the user performs an action, or is it bound to an event on the form such as Form initialized, View executes Load, etc. ? – NeilC Oct 15 '19 at 08:41

0 Answers0