[4.0.0-rc.0] ion-button ignores target attribute
See original GitHub issueBug Report
Ionic version: [x] 4.x
Current behavior:
When using ion-button
with href
and target
attributes, <a>
tag is created but is missing target
attribute.
Expected behavior:
target
attribute should be passed to the <a>
element inside ion-button
Steps to reproduce:
<ion-button href="/assets/files/FILE.pdf" target="_blank">
<ion-icon slot="start" name="cloud-download"></ion-icon>
OPEN IN NEW TAB
</ion-button>
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.6.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-rc.0
@angular-devkit/build-angular : 0.11.4
@angular-devkit/schematics : 7.1.4
@angular/cli : 7.1.4
@ionic/angular-toolkit : 1.2.1
System:
NodeJS : v11.5.0 (/usr/local/Cellar/node/11.5.0/bin/node)
npm : 6.5.0
OS : macOS Mojave
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:5 (1 by maintainers)
Top Results From Across the Web
[4.0.0-rc.0] ion-button ignores target attribute #16848 - GitHub
When using ion-button with href and target attributes, <a> tag is created but is missing target attribute. Expected behavior: target attribute ...
Read more >ion-button - Ionic Framework
ion-button provides a clickable element for use anywhere needing standard button functionality. Design and style button elements with custom CSS properties.
Read more >Browse Javascript Technical Problem Clusters - Code Grepper
Get code examples instantly right from your google search results with the Grepper Chrome Extension.
Read more >react-papaparse | browser CSV | CSV Processing library - kandi
Implement react-papaparse with how-to, Q&A, fixes, code snippets. kandi ratings - Low support, No Bugs, No Vulnerabilities.
Read more >javascript - thiscodeWorks - Organizing the best of code online
waitForSelector('#product-attribute-specs-table', {timeout: 0}) const berat ... jQuery.get(imgURL, function(data) { // Get the SVG tag, ignore the rest var ...
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 FreeTop 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
Top GitHub Comments
Thank you for the issue! I’ve merged this in via the PR here: https://github.com/ionic-team/ionic/pull/17883
The fixes for this will be in the
4.6.0
release.ion-item
has the same behavior… ignores passing these attributes on to the<a>
tag.As a result, installed PWAs (web app “Add to Homescreen”) won’t properly use the
target="_blank"
attribute onion-button
orion-item
and links to sub-domains that share the same primary domain will open as-if they are part of the PWA rather than as-if they are an external link to the application.