YUI: click on disabled buttons

Октябрь 16, 2009

Странно, но я обнаружил, что дазейбленные YUI кнопки реагируют на события, не смотря на то что на YUI API сказано, что не должны:

disabled — Boolean
indicating if the button should be disabled. (Disabled buttons are dimmed and will not respond to user input or fire events. Does not apply to button’s of type «link.»)

Немного покопавшись в коде, я нашел причину такого странного поведения — дело в том, что подписка на события была сделана через

YAHOO.util.Event.addListener("click", "btnId", eventHandler);

в этом случаи событие срабатывает не зависимо от состояния. Для того, чтобы это поправить, необходимо подписаться на событие следующим образом:

someButton.on("click", eventHandler);

NB: чтобы задизейблить YUI кнопку:

someButton.set("disabled", true); 

posted in Без рубрики by dmitko

28 Comments to "YUI: click on disabled buttons"

  1. http://lifewebs.ru wrote:

    Хорошо пишете, жизненно. Но, для того, чтобы делать по-настоящему интересный блог,
    нужно не только говорить о чем-то, но и делать это
    в интересной форме:)

  2. индекс wrote:

    Доброго времяни суток,
    скажите пожалуйста на какой платформе лучше
    всего будет создать свой сообственый блог?

  3. online mail services wrote:

    I think the admin of this site is truly working hard in support of his web page, since here every material is quality
    based information.

  4. chili con carne rezept wrote:

    The warranties for some branded cars may go up to 3 or 4
    years depending on the model. Today, Parents magazine and car-buying platform Edmunds.
    Go to the search tool and search for keyword like used cars in Bangalore, pre
    owned cars and second hand cars in Bangalore.

  5. breakneck mod wrote:

    I read this post fully about the resemblance of newest and
    previous technologies, it’s amazing article.

  6. grace place berthoud co wrote:

    Helpful information. Fortunate me I found your site by accident, and I’m
    stunned why this accident did not came about earlier! I biokmarked
    it.

  7. bit.ly wrote:

    I pay a viksit each day a few blogs and blogs to read content, however this blog offer quality based writing.

  8. hemat wrote:

    Hi, I want to subscribe for this weblog to obtain hottest updates, therefore where can i do it please help.

  9. x game bmx bike wrote:

    John has been competing professionally since 2002 and he is
    a ten-time Bassmaster Classic Qualifier.

  10. college loans with poor credit wrote:

    You don’t have to contribute as much as the higher interest card, but make more than the minimum
    payments if you can.

  11. kapanlagi wrote:

    you’re in point of fact a just right webmaster. The website loading speed is amazing.
    It seems that you’re doing any unique trick. Furthermore, The contents are masterwork.

    you have done a wonderful task in this subject!

  12. Dream wrote:

    Hello there, You have done an incredible job. I will certainly digg it
    and personally recommend to my friends. I’m sure they will be benefited from this web site.

  13. 91600 potong wrote:

    If you would like to increase your know-how only
    keep visiting this web page and be updated with the
    most up-to-date news posted here.

  14. ramadhani wrote:

    It’s going to be ending of mine day, but before ending I am reading this
    fantastic post to increase my know-how.

  15. invitaciones de cumpleaños gratis wrote:

    Genial! esta web me ha dado muchas ideas para mis nuevos proyectos,
    muchas gracias

  16. Tarot verdadero wrote:

    After checking out a handful of the blog articles on your web site, I really
    like your technique of blogging. I saved as a favorite it to my bookmark site list and will
    be checking back soon. Take a look at my web site too and let
    me know what you think.

  17. magia blanca atraer el amor wrote:

    What’s up all, here every person is sharing such knowledge, therefore it’s nice to read this blog,
    and I used to pay a quick visit this webpage every day.

  18. Kabar Terbaru Kutek wrote:

    It’s an remarkable post for all the internet viewers;
    they will take advantage from it I am sure.

  19. Foto Terbaru Ge Pamungkas wrote:

    Hi there, yup this post is really pleasant and I have learned lot of
    things from it regarding blogging. thanks.

  20. budget car rental wrote:

    All breaking automotive industry news these changes are expected to give it different and much better condition as
    compared to the car outright for this car
    is different from used cars. The company breaking automotive industry news promises space and elegance with technology for a new one.
    2m along with the Indian market has made it possible for you through various online tyre merchants.

  21. Masker rambut wrote:

    Good article. I am facing some of these issues as
    well..

  22. login wrote:

    Hi everybody, here every person is sharing these familiarity, therefore it’s good to read this webpage, and I used to go
    to see this blog all the time.

  23. pekerja wrote:

    This is a good tip especially to those fresh to the blogosphere.
    Simple but very precise information… Thanks for sharing this one.
    A must read post!

  24. Renaldo wrote:

    It is reasonable to get as much help from them as possible.
    With a home-equity line of credit, you’ll likely
    have prepayment penalties and a lien on your home
    until it is paid. In previous years getting car loan was rough and hectic
    but it is not the case these days.

  25. Tren Rambut wrote:

    hey there and thank you for your info – I have certainly picked
    up anything new from right here. I did however expertise a few technical points using this site,
    as I experienced to reload the website lots of times previous to I could get it to load
    properly. I had been wondering if your web host is OK?

    Not that I’m complaining, but slow loading instances times will often affect your placement in google and
    could damage your high-quality score if advertising and marketing with Adwords.
    Anyway I am adding this RSS to my e-mail and could look out for
    a lot more of your respective intriguing content.
    Ensure that you update this again very soon.

  26. Alphonse wrote:

    But the next moment finance problems causes helplessness and paralyses your spirits and ties your dreams in the shackles of financial problems.

    This way, you will be aware of one’s exact credit score.
    They will now have to pay a minimal amount of money that too on an installment
    basis without ever worrying about how to repay
    a bulk amount of money at the end of the loan term.

  27. ciuman Bibir wrote:

    Informasi siklus menstruasi Penyakit Tipes VEMALE.com
    Pengertian pola hidup sehat dan Pengertian telinga VEMALE.com
    Prostat, Mengenai manfaat yoga vemale.com
    Penjelasan puting susu dan Tentang tumor payudara vemale.com
    Tifus dan sperma VEMALE.com
    Apa Itu kacang almond, Tentang manfaat kulit manggis VEMALE.COM
    Informasi kesehatan — Informasi penyebab vertigo Vemale.com
    Pengertian malam — Pengertian penyakit vertigo VEMALE.com
    Pengertian kepribadian ganda dan Apa Itu obat mata VEMALE.COM
    Obat darah tinggi — Tentang cara memutihkan kulit Vemale.com
    Mengenai batu ginjal, Mengenai cara menguruskan badan VEMALE.com

  28. pengertian penyebab Rambut rontok Pada Pria wrote:

    Tentang warna rambut 2016 Mengenai cat rambut merdeka.com
    murah merawat, Info penyebab ketombe Merdeka.com
    Pengertian penyebab rambut rontok pada pria dan Mengenai obat untuk rambut rontok MERDEKA.com
    Pengertian masker rambut, Pengertian rambut keriting MERDEKA.COM
    Penjelasan shampo anti ketombe, rambut berwarna tetap keren MERDEKA.COM
    Apa itu kutu rambut — Apa itu gaya potongan rambut MERDEKA.com
    Gaya rambut pria 2016 — Tentang cara menumbuhkan rambut rontok
    Merdeka.com
    Mengenai gaya rambut wanita 2016 dan Info warna rambut MERDEKA.COM
    Tentang shampo anti ketombe terbaik — untuk Merdeka.com
    Penumbuh rambut alami, Pengertian cara merawat rambut secara alami Merdeka.com
    Penyubur rambut dan Informasi rambut keren MERDEKA.COM

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org