gwtbootstrap / gwt-bootstrap

A GWT Library that provides the widgets of Bootstrap, from Twitter.
http://gwtbootstrap.github.com
406 stars 190 forks source link

Button href & Internet Explorer #481

Open TekTimmy opened 10 years ago

TekTimmy commented 10 years ago

When clicking "com.github.gwtbootstrap.client.ui.Button" in Internet Explorer (I tested version 9, 10 and 11) GWT raises an event that makes it call the "mayStop" method in "com.google.gwt.activity.shared.Activity"s.

I have to completly remove the "href" attribute from the Button element to prevent this behavior. By default the button contains href="javascript:;" which should be removed as long as no href value is assigned.

reinert commented 10 years ago

hummmm.....

I really don't know why href="javascript:;" is put by default.

@caarlos0 do you know?

Anyway, as an alternative, if this keeping this heref initial value is really necessary, we can maybe stopPropagation.

caarlos0 commented 10 years ago

An anchor without a href don't have the "hand" cursor on hover. I believe that because of that, but I dunno if this is from gwt-bootstrap or gwt itself.

TekTimmy commented 10 years ago

I must say that to solve this problem i have to remove the whole "ahref" attribute not just setting an empty value.

BAVhel commented 9 years ago

As workaround in extended class from Button @Override public void setEmptyHref() { getElement().removeAttribute("href"); }