diff --git a/files/js/fileactions.js b/files/js/fileactions.js
index bb02b639c57..0722708e683 100644
--- a/files/js/fileactions.js
+++ b/files/js/fileactions.js
@@ -53,7 +53,7 @@ FileActions={
var html='
'+name+'';
var element=$(html);
element.data('action',name);
- element.click(function(){
+ element.click(function(event){
event.preventDefault();
actions[$(this).data('action')](FileActions.getCurrentFile());
});
diff --git a/files/js/files.js b/files/js/files.js
index c758432a4f6..2e95a7881ef 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -14,13 +14,13 @@ $(document).ready(function() {
);
// Sets the file-action buttons behaviour :
- $('td.fileaction a').live('click',function() {
+ $('td.fileaction a').live('click',function(event) {
event.preventDefault();
FileActions.display($(this).parent());
});
// Sets the file link behaviour :
- $('td.filename a').live('click',function() {
+ $('td.filename a').live('click',function(event) {
event.preventDefault();
var filename=$(this).text();
var mime=$(this).parent().parent().attr('data-mime');