No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    QInput autofocus within modals not working

    Help
    3
    3
    626
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      joeyezekiel last edited by

      The autofocus property for q-input does not seem to work within modals. For eg, if I have a q-input within a modal, once the modal is shown, the autofocus does not trigger.

      I also have another modal within a component which requires the same behavior.
      Is there any way I can get it to work?

      I tried the hack from another post:
      document.querySelectorAll('input#someid').item(0).focus()

      Is there a better way to do this?

      1 Reply Last reply Reply Quote 1
      • L
        Lou Rectoret last edited by

        Did you managed to solved it? @joeyezekiel I’m having the same issue šŸ˜ž

        1 Reply Last reply Reply Quote 0
        • metalsadman
          metalsadman last edited by

          try passing your focus function as parameter on this.$nextTick([callback]) https://vuejs.org/v2/api/#Vue-nextTick.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post