Commit 1d649f21 authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review
Browse files

Merge "Hide accessibility link on drag-and-drop."

parents aad93394 1bb15dcd
...@@ -479,12 +479,12 @@ function FileBrowser(idprefix, folderid, config, globalconfig) { ...@@ -479,12 +479,12 @@ function FileBrowser(idprefix, folderid, config, globalconfig) {
if (elemid != moveid) { if (elemid != moveid) {
var displaytitle = title.find('.display-title').html(); var displaytitle = title.find('.display-title').html();
var link = $j('<a>').attr('href', '#').html(get_string('moveto', displaytitle)); var link = $j('<a>').attr('href', '#').html(get_string('moveto', displaytitle));
link.on('mousedown keydown', function(e) { link.on('click keydown', function(e) {
if (e.type == 'mousedown' && e.buttons == 0) { if (e.type == 'click' && e.buttons == 0) {
// Stops the link being activated when it shouldn't (eg. when setting focus to the list) // Stops the link being activated when it shouldn't (eg. when setting focus to the list)
return false; return false;
} }
else if (e.type == 'mousedown' || e.keyCode == 32 || e.keyCode == 13) { else if (e.type == 'click' || e.keyCode == 32 || e.keyCode == 13) {
self.setfocus = 'changefolder:' + elemid; self.setfocus = 'changefolder:' + elemid;
self.move_to_folder(moveid, elemid); self.move_to_folder(moveid, elemid);
self.move_list = null; self.move_list = null;
...@@ -522,8 +522,8 @@ function FileBrowser(idprefix, folderid, config, globalconfig) { ...@@ -522,8 +522,8 @@ function FileBrowser(idprefix, folderid, config, globalconfig) {
this.make_icon_keyboard_accessible = function(icon) { this.make_icon_keyboard_accessible = function(icon) {
var self = this; var self = this;
var id = icon.id.replace(/.+:/, ''); var id = icon.id.replace(/.+:/, '');
$j(icon).on('mousedown keydown', function(e) { $j(icon).on('click keydown', function(e) {
if (e.type == 'mousedown' || e.keyCode == 32 || e.keyCode == 13) { if (e.type == 'click' || e.keyCode == 32 || e.keyCode == 13) {
var folderlist = self.create_move_list(icon, id); var folderlist = self.create_move_list(icon, id);
if (folderlist != '') { if (folderlist != '') {
$j(icon).closest('tr').find('.filename').append(folderlist); $j(icon).closest('tr').find('.filename').append(folderlist);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment