Comments (5)
I think I might've found a way where we don't need a custom event: we can probably just use the native reset
event on forms.
The AJAX form-cms-handler.plugin.js
could trigger a form reset (this.el.reset()
) after submission, which even makes some sense semantically... the form is submitted via AJAX, and then the form itself is reset.
The form-preserver.plugin.js
can then just clear the local storage on both submit
and reset
(which kind-of makes sense in any case - if a form is reset, we probably don't want to keep the information in local storage, anyway).
This way, we'd keep both plugins nicely uncoupled - what do you think?
from platform.
I am not the JS pro, but sounds reasonable for me 😁
if you like, you can put that into a PR and let's see what our frontend guys think about that 🙂
from platform.
fixed with #3753
from platform.
We found the following existing issues which may help or are related to your topic:
- Form preserver iterates through wrong elements
- Privacy policy does not correctly redirect back to the form
- Dissapearing content in CMS editor
- CMS Page Editor Sidebar settings have no effect after page was saved
- Duplicating contact data results in empty form
- After an error in the registration form, the data is no longer displayed in full
- Contact form and privacy policy CMS widgets on top of each other lead to problems when closing
- Admin: Fields are not cleared after language switch
- contact form not working properly
from platform.
Maybe we can introduce an event, that other JS plugins can emit and the preserver plugin is listening to. so custom submit-like stuff could also be handled.
from platform.
Related Issues (20)
- Category tree component displays wrong values HOT 2
- Body scroll on empty promotion code add HOT 2
- Type error in MailFactory HOT 2
- NEXT-37757 - Add Context to OrderStateChangeCriteriaEvent HOT 2
- Arrow and Dot Navigation > None - Arrows are still visible HOT 2
- Import / Export Profile sorting of columns in mapping not working properly HOT 2
- Custom CMS block (App) creates slots in wrong order HOT 2
- Customer does not see the success message after leaving a review HOT 3
- Sales Representative Orders are not correctly tracked HOT 2
- Test Publisher Bug Report HOT 3
- Cms data mapping for nested entity don't works for translations HOT 1
- when creating a new customer in admin, salutation of the shipping address is saved incorrectly HOT 1
- Discount for shipping costs are not visible in cart and invoice HOT 2
- Flow Builder - "Exit status" as a trigger and a "delay" not working HOT 2
- [Github] fix(admin): Allow (batch) deletion of categories from the category tree element HOT 2
- delay in InvalidateCacheTaskHandler is useless HOT 1
- Product slider with the name "Product slider" only displays 5 articles HOT 3
- Main Variant shown also if parentProduct = 1 (variant_listing_config) HOT 2
- Checkout: Missing validation error for unchecked terms and conditions checkbox HOT 2
- CMS Product Slider element, when configured to list products from dynamic product group may not list any products at all. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from platform.