From 4ae069d424f3965a85afca9621f0879c8276dbb8 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 13 Aug 2015 12:02:32 -0700 Subject: [PATCH] GUAC-1293: Prevent selection of filename text during navigation. --- .../main/webapp/app/client/directives/guacFileBrowser.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guacamole/src/main/webapp/app/client/directives/guacFileBrowser.js b/guacamole/src/main/webapp/app/client/directives/guacFileBrowser.js index bd68211b4..894469300 100644 --- a/guacamole/src/main/webapp/app/client/directives/guacFileBrowser.js +++ b/guacamole/src/main/webapp/app/client/directives/guacFileBrowser.js @@ -164,6 +164,12 @@ angular.module('client').directive('guacFileBrowser', [function guacFileBrowser( element.addClass('focused'); }); + // Prevent text selection during navigation + element.on('selectstart', function avoidSelect(e) { + e.preventDefault(); + e.stopPropagation(); + }); + return element; };