diff options
author | Stan Hu <stanhu@gmail.com> | 2015-05-24 09:00:00 -0400 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-05-24 20:19:26 -0400 |
commit | 310e08dc2cd743952ef9a6f3bf7300448147dc77 (patch) | |
tree | 2a0a636f0094ec3b042a2b6da82a357124282515 | |
parent | f042b085f64223ffe7b9d26f003ee2db76af27a6 (diff) | |
download | gitlab-ce-310e08dc2cd743952ef9a6f3bf7300448147dc77.tar.gz |
Fix clone URL losing selection after a single click in Safari and Chrome
Closes #9326
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/assets/javascripts/application.js.coffee | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index d1ecfb40350..45e2ee0eb74 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 7.12.0 (unreleased) + - Fix clone URL losing selection after a single click in Safari and Chrome (Stan Hu) - Allow to configure location of the `.gitlab_shell_secret` file. (Jakub Jirutka) - Disabled expansion of top/bottom blobs for new file diffs - Update Asciidoctor gem to version 1.5.2. (Jakub Jirutka) diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index caf18c0d860..ea2a4b97101 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -116,7 +116,10 @@ window.addEventListener "hashchange", shiftWindow $ -> # Click a .js-select-on-focus field, select the contents - $(".js-select-on-focus").on "focusin", -> $(this).select() + $(".js-select-on-focus").on "focusin", -> + # Prevent a mouseup event from deselecting the input + $(this).select().one 'mouseup', (e) -> + e.preventDefault() $('.remove-row').bind 'ajax:success', -> $(this).closest('li').fadeOut() |