Patch #17401

Better fix for r13159 issue #16708

Added by Daniel Felix over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Code cleanup/refactoring
Target version:2.6.0

Description

You can fix this one with a little bit cleaner code:

Change:
<button class="tab-left" onclick="moveTabLeft(this); return false;"></button>

to:
<button class="tab-left" type="button" onclick="moveTabLeft(this);"></button>

Browsers defaults often to type="submit" which submits the form. If you explicite define a type, it will be fine.
The return false; is not the cleanest way, as... if you call some code afterwards, it won't be executed because the propagation ends there.

Associated revisions

Revision 13326
Added by Jean-Philippe Lang over 3 years ago

Use type="button" instead of return false; (#17401).

Patch by Daniel Felix.

History

#1 Updated by Jean-Philippe Lang over 3 years ago

  • Category changed from UI to Code cleanup/refactoring
  • Status changed from New to Closed
  • Target version set to 2.6.0

Patch committed in r13326, thanks!

Also available in: Atom PDF