diff --git a/CHANGELOG b/CHANGELOG index d1ecfb40350a4f2643707b9f9ac9e72928139d02..45e2ee0eb741280fd0aa97ffcebf41c8e08d35c7 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 caf18c0d860f3f032cc6275be763bc29b2743149..ea2a4b9710118b3b925e69391ed5e3d753c6697c 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()