Can't return false when using getAndBindTo
Closed this issue · 2 comments
outadoc commented
When using getAndBindTo() or similar, it is impossible to prevent the default event from being fired, unlike when using a function like click(), which offers the $ret_false parameter.
This makes it impossible to click on an anchor without having the page scroll all the way up, or at least not in any straightforward way.
jcheron commented
Yes, it is unacceptable ...
fixed with 6dc8812
preventDefault parameter is now present in all get/post/postForm...AndBindTo methods (default to true)
public function getAndBindTo($element,$event,$url,$responseElement="",$preventDefault=true,$params="{}",$function=NULL,$attr="id"){
...
}
jcheron commented
there is also no way to stop propagation of events ...
Considering the number of function parameters, I think the next implementation should be :
public function getAndBindTo($element,$event,$url,$responseElement="", $parameters=array())
Thank you for reporting