-
Notifications
You must be signed in to change notification settings - Fork 219
Fix click on Proceed to checkout bug when Coupon error is visible. #3996
Conversation
Size Change: -31 B (0%) Total Size: 1.16 MB
ℹ️ View Unchanged
|
Just making a note that I suggested an alternative to empty elements in using e.preventDefault on the place order button click. If thats not viable, another thing we could consider is making the notice only dismiss after re-entry to the coupon field rather than on blur. |
Fixed this by making sure the validation error looks & feels like other validations in the checkout & cart forms. I had to add a small space on the bottom (just CSS) because all the input fields need 1.5em space under them. |
@mikejolley ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving this on the basis that it solves the issue and matches the fields on checkout. I think these could use some work in the future though, the styling doesn't seem great—it's cramped and would break with longer messages I expect.
👍🏻
The bug happened because of the layout shift produced by the error message disappearance.
3ea77c9
to
26b7013
Compare
The bug happened because of the layout shift produced by the error message disappearance.
This PR adds an in-place fix for the Coupon code field. It adds an empty space equal to the space taken up by the error message.
If this becomes an issue for other parts of the project we will need to implement a project-wide sollution.
Fixes #3968
Screenshots
The ticket has the original behavior.
Changes seen here.
How to test the changes in this Pull Request:
Steps to reproduce the behavior:
Make sure you use the Cart block
Add any product to the cart and go to the Cart block.
Enter an invalid coupon code.
See coupon validation error appear
Click on the "Proceed to Checkout" button
Notice you are directed to the Checkout
Changelog