1
0

Fixes type/href attributes for button elements.

– <button> must have an explicit type="buttons" since it falls back
  to type="submit", which can have side effects
– <button> must not have a href attribute, always use data-href
This commit is contained in:
Matthias Mees
2013-10-02 11:05:27 +02:00
parent 5f2c8eb9dd
commit d0de74737e
7 changed files with 17 additions and 17 deletions

@ -399,7 +399,7 @@ window.log = function f(){ log.history = log.history || []; log.history.push(arg
// this function got called on load of the editor
var toggleButton = '#toggle_' + id;
$('#'+id).before('<button class="button_link" id="toggle_' + id + '" href="#' + id + '"><span class="icon-plus"></span><span class="visuallyhidden"> {$CONST.TOGGLE_ALL}</span></button>');
$('#'+id).before('<button id="toggle_' + id + '" class="button_link" type="button" href="#' + id + '"><span class="icon-plus"></span><span class="visuallyhidden"> {$CONST.TOGGLE_ALL}</span></button>');
$(toggleButton).click(function(e) {
e.preventDefault();