question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report] v-btn with input type="submit" not supported

See original GitHub issue

Environment

Vuetify Version: 2.2.26 Vue Version: 2.6.11 Browsers: Firefox 75.0 OS: Mac OS 10.15

Steps to reproduce

The type prop is ignored here

<v-btn
	tag="input"
	type="submit"
	value="Log In"
	name="login"
	elevation="0"
/>

Expected Behavior

The type prop should be rendered on the input button.

Actual Behavior

The type prop is ignored.

Reproduction Link

https://codepen.io/dougalg/pen/XWmejzv

Other comments

In the v-btn render function I can see that the type is ignored if the tag is not a button:

    if (tag === 'button') {
      data.attrs!.type = this.type
      data.attrs!.disabled = this.disabled
    }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
phitercommented, May 6, 2020

@dougalg actually using a button with type="submit" already works for submitting the form automatically on pressing enter. There is not much of a difference between the two.

Difference between <button type="submit"> and <input type="submit">

I personally never used <input type="submit"> and never encountered a case where I would need it instead of a button.

0reactions
johnleidercommented, May 8, 2020

Thank you for your report and feedback.

If you have any additional questions, please reach out to us in our Discord community.

Read more comments on GitHub >

github_iconTop Results From Across the Web

<input type="submit"> - HTML: HyperText Markup Language
This method supports complex data and file attachments. dialog. This method is used to indicate that the button closes the dialog with which...
Read more >
HTML Form Button value is not posted in Safari and Chrome
The problem turned out to be that I am disabling the [Submit] button at onclick= in the <button> tag (using the button id=)....
Read more >
Bootstrap Buttons - W3Schools
Button Styles. Bootstrap provides different styles of buttons: Basic Default Primary Success Info Warning Danger Link. To achieve the button styles above, ...
Read more >
Why does button "onclick" execute a Submit on Bug Report page
I tried running a separate php document. Examples: <input type="submit" class="btn btn-secondary btn-sm" value="Get Hours" onclick=' ...
Read more >
Forms Fail When Using <button type="submit"> (Instead of ...
<input type="submit" name="add-review" class="button-1 write-product-review-button btn ... From what I can tell, these forms do not rely on any jQuery, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found