Navigation

    Quasar Framework

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

    q-dialog accidental 'enter' key press issue

    Framework
    q-dialog
    2
    4
    19
    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
      jitendra16 last edited by

      I have a situation where i need to confirm a delete operation, I faced an issue with q-dialog is that if the user accidentally presses ‘Enter’ key then is treated as ‘onOk’. i want to execute ‘onCancel’ as default for ‘enter’ key.

      How can I achieve this?

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @jitendra16 last edited by

        @jitendra16

        Instead you could use the more customizable QDialog component( Instead of the dialog plugin ):
        https://quasar.dev/vue-components/dialog

        J 1 Reply Last reply Reply Quote 0
        • J
          jitendra16 @dobbel last edited by

          @dobbel yes i am using it, but for small confirmations and prompts i have made a function with q-dialog plugin, in a mixin to reuse everywhere.

          1 Reply Last reply Reply Quote 0
          • J
            jitendra16 last edited by

            @s-molinari Can we set autofocus to ‘cancel’ instead of ‘ok’ so that accidental ‘enter’ keypress event can be treated as cancelled.

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