Load More data jumps up after loading data AngluarJS with fireFox

67
February 13, 2020, at 01:20 AM

When I load dynamic data into my page using AngularJS, the page jumps to the top (The containing element) if I use EnablePromise function. This happens with Firefox but not with Chrome.

This is the function which enables promises

function EnablePromise(state) {
  if (state) {
     self.model.enablePromise.q.resolve();
     self.model.enablePromise.q = $q.defer();
     self.model.enablePromise.set = true;
  } else {
     self.model.enablePromise.q.resolve();
     self.model.enablePromise.set = false;
 }
};

This is the model

this.model = {
    enablePromise: { q: $q.defer(), set: false },
    language: '',
    title: 'invoice'
    invoiceData: [],
    invoicesAllPages: 0,
    invoiceTop: 50,
    invoicePage: 0
};

I don't know why this happens with FireFox

Thanks in advance.

READ ALSO
My Angular App works locally, but it gets an error on Heroku. Source Map URL: index.js.map

My Angular App works locally, but it gets an error on Heroku. Source Map URL: index.js.map

I can pull data from the JSON locally (when using ng serve) and modify the DOM with it, but not on Heroku

91
Can this script be used to create multiple SVG elements?

Can this script be used to create multiple SVG elements?

I have the following JavaScript that creates a graph using snap SVG

108
Prevent reloading a website after sweetalert

Prevent reloading a website after sweetalert

On a web page there is a table with a few rowsIn each line there is a button that triggers a Javascript function:

112
How to use javascript to put volume to 0 or close current tab for twitch or just mute the chrome tab?

How to use javascript to put volume to 0 or close current tab for twitch or just mute the chrome tab?

i am making a google chrome extension and currently, i want a function that either close the twitchtv tab or put volume of the stream to 0 is it possible or maybe the best way would be to mute the chrome tab

73