GithubHelp home page GithubHelp logo

Comments (7)

tomfulton avatar tomfulton commented on June 18, 2024

This might (partially) fix #33 also, as it seems to somewhat work on load, just not on addRow

from archetype.

kgiszewski avatar kgiszewski commented on June 18, 2024

@tomfulton IHMO I think it's the way the some of the jQueryUI properties were wrapped. I can make the slider work properly with Archetype if it's implemented as a directive instead of via the controller.

from archetype.

kgiszewski avatar kgiszewski commented on June 18, 2024

Check this for reference: https://github.com/umbraco/Umbraco-CMS/blob/b3f6a8c71bdd84e874f0b643373cbbe1aec2fd90/src/Umbraco.Web.UI.Client/src/views/propertyeditors/slider/slider.controller.js#L39

Only fires onload. Should be done via a directive :)

from archetype.

tomfulton avatar tomfulton commented on June 18, 2024

Gotcha, makes sense. I just spent some time digging into the DatePicker, and it looks like a similar thing.

When adding a new row, it is executing the DatePicker Controller's JS, but it calls assetService.load(), and it seems the promise never "resolves" (the .then() method never gets executed), so the code to init the widget never gets executed.

What's funny is, the promise resolves as soon as you click anywhere on the body, or even just hovering over the left navbar.

Also, the DatePicker's call to assetService.load() gets all the way here, so I'm not sure why it never actually resolves. Side note: seems to work fine if we pass a scope parameter, even though they use (almost) the same code.

Anyway, I'm in la-land here. Any ideas as to why that method wouldn't finish sometimes?

from archetype.

tomfulton avatar tomfulton commented on June 18, 2024

A little more digging:

It might be that $compile doesn't resolve promises. The docs show that some other template related functions don't.

This workaround and calling $rootScope.$apply() seems to fix it, but seems to still break occasionally)

from archetype.

kgiszewski avatar kgiszewski commented on June 18, 2024

Related? kgiszewski/Umbraco-CMS@6944f25

from archetype.

tomfulton avatar tomfulton commented on June 18, 2024

Added weird workaround in #70

from archetype.

Related Issues (20)

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.