Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

355
Visualizações
Why my dropdown list runs slower in Firefox than Chrome

My DropDown list get's open much faster in chrome

but in firefox it get's open slower

I use transitions in Nuxt with methods to handle steps of transition

It works fine in both but it's slower in Firefox

              <transition
                v-on:before-enter="beforeEnter"
                v-on:enter="enterCoins"
                v-on:leave="leave">
                <ul v-if="coinsBox">
                  <li v-if="live_prices.length > 0" v-for="(currency,index) in live_prices"
                      @click="activeCoin = index;activeCoinChange();coinsBox=false"
                      :class="{active:activeCoin === index}">
                    <div class="coin">
                      <img :src="'/imgs/coins/'+currency.symbol.toLowerCase()+'.svg'" alt="" v-else>
                      <span class="name en">{{ currency.symbol }}&nbsp;-&nbsp;</span>
                    </div>
                  </li>
                </ul>
              </transition>

and these are methods I used :

   beforeEnter(el) {
      el.style.height = 0;
      el.style.overflow = "auto";
    },
   enterCoins(el, done) {
      let maxHeight;
      if (this.live_prices.length <= 3 && this.live_prices.length > 0) {
        maxHeight = this.live_prices.length * 56
      } else {
        maxHeight = 224
      }
      this.increaseHeight(el, done, maxHeight)
    },
   increaseHeight(el, done, maxHeight) {
      clearInterval(this.leaveInterval);
      const increaseHeight = () => {
        let elHeight = parseInt(el.style.height)
        if (elHeight < maxHeight) {
          const height = `${parseInt(el.style.height) + 5}px`;
          el.style.height = height;
        } else {
          clearInterval(this.enterInterval);
          done();
        }
      };
      this.enterInterval = setInterval(increaseHeight, 5);
    },
    leave(el, done) {
      clearInterval(this.enterInterval);
      const decreaseHeight = () => {
        let elHeight = parseInt(el.style.height)
        if (elHeight > 0) {
          const height = `${parseInt(el.style.height) - 5}px`;
          el.style.height = height;
        } else {
          clearInterval(this.leaveInterval);
          done();
        }
      };
      this.leaveInterval = setInterval(decreaseHeight, 5);
    },

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda