We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9431e8 commit 573b5a7Copy full SHA for 573b5a7
js/configure.coffee
@@ -10,8 +10,8 @@ class @Configure
10
@form = @element.querySelector("form")
11
@snippet = @element.querySelector("#snippet")
12
13
- # Copy the snippet text on focus
14
- @snippet.addEventListener "focus", @copy
+ # Select the snippet text on focus
+ @snippet.addEventListener "focus", -> @select()
15
# Prevent mouseup from unselecting the text
16
@snippet.addEventListener "mouseup", (e) -> e.preventDefault()
17
@@ -72,10 +72,6 @@ class @Configure
72
data[key] = values[index] for key,index in @constructor.variables
73
data
74
75
- copy: (event) =>
76
- event.target.select()
77
- document.execCommand('copy')
78
-
79
class Template
80
constructor: (@element) ->
81
0 commit comments