Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button Bug Issue #645 #648

Merged
merged 1 commit into from
Oct 27, 2021
Merged

Button Bug Issue #645 #648

merged 1 commit into from
Oct 27, 2021

Conversation

ChrisPaj
Copy link
Collaborator

Button - Link element auto sets download="false" #645

@ChrisPaj ChrisPaj requested a review from nowseemee as a code owner October 27, 2021 05:58
@render
Copy link

render bot commented Oct 27, 2021

@nowseemee nowseemee merged commit 6a7c368 into main Oct 27, 2021
@nowseemee nowseemee deleted the refactor/button-download-bug branch October 27, 2021 08:16
@acstll
Copy link
Collaborator

acstll commented Oct 27, 2021

@nowseemee @ChrisPaj I think this is not quite fixed yet 🤪

The download attribute mainly expects a string to set the file name of the download. So in the first place its type should be string. In any case, not default to false.

According to the docs in MDN, it could also be present without a value (acting like a boolean attribute).

I would make the prop type string | true (if that works), and then see how Stencil handles that. If it gets too tricky, I would make it only a string and then check for "true" (as a string). The end result must be either:

<!-- a string value -->
<a href="..." download="some-value.pdf">Label</a>
<!-- or no value (boolean) -->
<a href="..." download>Label</a>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants