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

[4.x] Change Inertia Modal.vue component to use a native <dialog> #1431

Merged
merged 6 commits into from
Feb 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added preventDefault to allow the regular close animation to fire nicely
  • Loading branch information
Smef committed Jan 29, 2024
commit 126d4c3e0ec4f3ed3689599825985c5097e376c3
1 change: 1 addition & 0 deletions stubs/inertia/resources/js/Components/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ watch(() => props.show, () => {
const close = () => {
if (props.closeable) {
emit('close');
e.preventDefault();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test on a fresh installation. I just tried to update my already existing component and got this:

Uncaught ReferenceError: e is not defined

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's meant to be called in closeOnEscape?

Copy link
Contributor Author

@Smef Smef Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's really necessary at all. I've removed it and submitted a new PR. #1444

}
};

Expand Down
Loading