[Bug Report] v-btn with input type="submit" not supported
See original GitHub issueEnvironment
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:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.Thank you for your report and feedback.
If you have any additional questions, please reach out to us in our Discord community.