Giter Site home page Giter Site logo

Comments (5)

LukeTowers avatar LukeTowers commented on August 11, 2024

I've noticed that the change indicator has seemed a bit buggy in general for the past while, mostly when you have multiple tabs open. Do you think you could dig further into it and submit a PR to fix the issue?

from wn-pages-plugin.

LukeTowers avatar LukeTowers commented on August 11, 2024

@ericp-mrel is this something you'd be willing to take a look at?

from wn-pages-plugin.

ericp-mrel avatar ericp-mrel commented on August 11, 2024

Here's what I've found so far.

If you have multiple tabs open and you make changes to one of them, then all of the open tabs are being marked as modified.

It seems like something is causing the change event to be re-triggered after the original change event is fired since there is a slight delay between the first tab's close button is changed and when the others change.


There's also another issue related to the markup that's being added to the page when duplicating a page that's causing an issue with the modified counter not updating correctly. It seems like some of the form's hidden fields are being added as children inside a div, rather than being direct children to the actual form element itself.

This is problematic because of the following selector:

var inputType = $('> form > input[name=objectType]', this).val()

Screenshot 2024-06-16 at 11 06 16 AM

I haven't been able to figure out why this is happening yet.

from wn-pages-plugin.

ericp-mrel avatar ericp-mrel commented on August 11, 2024

This is what I've found after digging around with the JS debugger a little bit.

It seems like what's happening is when you make a change to an input field, the initial change event correctly fires and marks the active tab as modified. But then after that the FormWidget.onRefreshDependants function gets run and then triggers the change event during the refresh process and as a result of that every tab is marked as modified.

https://github.com/wintercms/winter/blob/9932f0c05f7423a50b526f05e2748185084bf143/modules/backend/widgets/form/assets/js/winter.form.js#L169-L200

from wn-pages-plugin.

LukeTowers avatar LukeTowers commented on August 11, 2024

@bennothommo @jaxwilko @mjauvin any thoughts?

from wn-pages-plugin.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.