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

[md-dialog] [md-button] [md-icon] dialog-action not working #4285

Closed
vdegenne opened this issue May 12, 2023 · 1 comment
Closed

[md-dialog] [md-button] [md-icon] dialog-action not working #4285

vdegenne opened this issue May 12, 2023 · 1 comment
Assignees

Comments

@vdegenne
Copy link
Contributor

vdegenne commented May 12, 2023

What problem are you having ?

When using dialog-action attribute on a button in a dialog, clicking the leading icon won't close the dialog.

Demonstration
Reproducible example : https://lit.dev/playground/#gist=77b206c931c6a2f3590b54e7a22220f1

Version
@material/web : v1.0.0-pre.12

@vdegenne vdegenne changed the title [md-dialog] [md-button] [md-icon] dialogAction not working [md-dialog] [md-button] [md-icon] dialog-action not working Jul 1, 2023
copybara-service bot pushed a commit that referenced this issue Aug 8, 2023
Fixes #4647
Fixes #4285

BREAKING CHANGE: See #4675 for more details.

Dialogs use the native `<dialog>` interface, which uses a `<form method="dialog">` to set up dialog actions.

```html
<md-dialog>
  <div slot="headline">A simple dialog</div>
  <form id="form" method="dialog" slot="content">
    This is a dialog with text content.
  </form>
  <div slot="actions">
    <md-text-button form="form" value="close">Close</md-text-button>
    <md-text-button form="form" value="ok">OK</md-text-button>
  </div>
</md-dialog>
```

PiperOrigin-RevId: 554893225
copybara-service bot pushed a commit that referenced this issue Aug 8, 2023
Fixes #4647
Fixes #4285

BREAKING CHANGE: See #4675 for more details.

Dialogs use the native `<dialog>` interface, which uses a `<form method="dialog">` to set up dialog actions.

```html
<md-dialog>
  <div slot="headline">A simple dialog</div>
  <form id="form" method="dialog" slot="content">
    This is a dialog with text content.
  </form>
  <div slot="actions">
    <md-text-button form="form" value="close">Close</md-text-button>
    <md-text-button form="form" value="ok">OK</md-text-button>
  </div>
</md-dialog>
```

PiperOrigin-RevId: 554893225
@asyncLiz
Copy link
Collaborator

asyncLiz commented Aug 10, 2023

Obsolete with #4677

Oh yea, the PR should close this

@asyncLiz asyncLiz reopened this Aug 10, 2023
@asyncLiz asyncLiz self-assigned this Aug 10, 2023
copybara-service bot pushed a commit that referenced this issue Aug 10, 2023
Fixes #4647
Fixes #4285

BREAKING CHANGE: See #4675 for more details.

Dialogs use the native `<dialog>` interface, which uses a `<form method="dialog">` to set up dialog actions.

```html
<md-dialog>
  <div slot="headline">A simple dialog</div>
  <form id="form" method="dialog" slot="content">
    This is a dialog with text content.
  </form>
  <div slot="actions">
    <md-text-button form="form" value="close">Close</md-text-button>
    <md-text-button form="form" value="ok">OK</md-text-button>
  </div>
</md-dialog>
```

PiperOrigin-RevId: 554893225
copybara-service bot pushed a commit that referenced this issue Aug 10, 2023
Fixes #4647
Fixes #4285

BREAKING CHANGE: See #4675 for more details.

Dialogs use the native `<dialog>` interface, which uses a `<form method="dialog">` to set up dialog actions.

```html
<md-dialog>
  <div slot="headline">A simple dialog</div>
  <form id="form" method="dialog" slot="content">
    This is a dialog with text content.
  </form>
  <div slot="actions">
    <md-text-button form="form" value="close">Close</md-text-button>
    <md-text-button form="form" value="ok">OK</md-text-button>
  </div>
</md-dialog>
```

PiperOrigin-RevId: 554893225
copybara-service bot pushed a commit that referenced this issue Aug 10, 2023
Fixes #4647
Fixes #4285

BREAKING CHANGE: See #4675 for more details.

Dialogs use the native `<dialog>` interface, which uses a `<form method="dialog">` to set up dialog actions.

```html
<md-dialog>
  <div slot="headline">A simple dialog</div>
  <form id="form" method="dialog" slot="content">
    This is a dialog with text content.
  </form>
  <div slot="actions">
    <md-text-button form="form" value="close">Close</md-text-button>
    <md-text-button form="form" value="ok">OK</md-text-button>
  </div>
</md-dialog>
```

PiperOrigin-RevId: 554893225
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 a pull request may close this issue.

2 participants