From f8a9f36dfacac127b0776982ecfece443b22cc08 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Fri, 31 Jan 2014 17:39:50 -0500 Subject: [PATCH] Don't use our copy handler when editing a message (imported from commit 49e7001d8aa9af4f482b62332da03faad784074f) --- static/js/ui.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/static/js/ui.js b/static/js/ui.js index 5a508ae794..056d6e9d9d 100644 --- a/static/js/ui.js +++ b/static/js/ui.js @@ -175,6 +175,13 @@ function copy_handler(e) { return; } + // Do nothing if the user is selecting anything while editing, + // as in that case we want to let the browser select the + // text field text as usual + if (startc.hasClass('edit-controls')) { + return; + } + // If the user is running the desktop app, we still create "div" // so that we can replace emoji with their text div.append(range.cloneContents());