Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
2
Help us understand the problem. What is going on with this article?
@yusukeasari

Vuetifyのv-dialogのスクロール位置がリセットされない件に対応してみた

More than 1 year has passed since last update.

利用規約などスクロールが必要なコンテンツをv-dialogに書くと、スクロール位置がリセットされない件に対応してみました(Vuetify v1.5対応)

まずはこちらに対応したv-dialogを用意
https://scrapbox.io/gyarasu/Vuetify%E3%81%AEv-dialog%E5%86%85%E3%81%A7%E3%82%B9%E3%82%AF%E3%83%AD%E3%83%BC%E3%83%AB%E4%BD%8D%E7%BD%AE%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B

dialogコンポーネントが開いた後に実行するメソッドなどに下記の方法でscrollTopを指定すればスクロール位置がリセットされます。

    let i = document.getElementById('scroll-target')
    i.attributes[1].ownerElement.scrollTop = 0
2
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
yusukeasari
備忘録と中途半端なことを書いていくと思います。好きです猫。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
2
Help us understand the problem. What is going on with this article?