adopted-ember-addons / adopted-ember-addons/ember-paper

paper-item secondary action href doesn't work

オープン
#919 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
879
フォーク
327
PR マージ指標
30日以内にマージされた PR はありません

説明

## Example:

```hbs
{{#paper-item as |controls| }}

Outer item



{{#controls.button secondary=true iconButton=true href="https://example.com"}}
{{paper-icon "add"}}
{{/controls.button}}

{{/paper-item}}
```

## Problem

Clicking the secondary action button will have no effect.

The code path responsible is:

- `bubbles=false` is set in [`paper-item.hbs`](https://github.com/remerge/ember-paper/blob/master/addon/templates/components/paper-item.hbs#L3)
- `false` is returned from the click handler in [`paper-button.js`](https://github.com/remerge/ember-paper/blob/master/addon/components/paper-button.js#L64)

## Possible solution

In reality, the click handler is useless when `href` is present. The browser's default behaviour would be better unless the user has provided an "onClick" attribute, in which case they'd expect it to be invoked.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。