Monaca Onsen UI Discord Chat Github Repo

More problems found about Ons-Speed-Dial



  • Re: Ons-Speed-Dial Fab does not stay at fixed position.

    Today I found some more problems about Ons-Speed-Dial

    1. document.querySelector(‘ons-fab’).disabled is not working

    2. document.querySelector(‘ons-fab’).setAttribute(‘disabled’)
      document.querySelector(‘ons-fab’).setAttribute(‘disabled’, ‘true’)
      These two scripts work fine.

    3. document.querySelector(‘ons-fab’).setAttribute(‘disabled’, ‘false’)
      But this script also sets ons-fab disabled, so how to enable it again?

    Best Regards
    Gobi


  • administrators

    I tested with document.querySelector('ons-fab').disabled = true and it seems to be working.

    If you are setting the HTML disabled attribute (which is different from the disabled property but achieves the same effect), you can remove it using the removeAttribute method.

    document.querySelector(‘ons-fab’).setAttribute(‘disabled’, ‘false’) does not work because HTML attributes are set as long as they have any value, including the string 'false'.