Skip to content

Commit 573b5a7

Browse files
committed
No magic copying
1 parent c9431e8 commit 573b5a7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

js/configure.coffee

+2-6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class @Configure
1010
@form = @element.querySelector("form")
1111
@snippet = @element.querySelector("#snippet")
1212

13-
# Copy the snippet text on focus
14-
@snippet.addEventListener "focus", @copy
13+
# Select the snippet text on focus
14+
@snippet.addEventListener "focus", -> @select()
1515
# Prevent mouseup from unselecting the text
1616
@snippet.addEventListener "mouseup", (e) -> e.preventDefault()
1717

@@ -72,10 +72,6 @@ class @Configure
7272
data[key] = values[index] for key,index in @constructor.variables
7373
data
7474

75-
copy: (event) =>
76-
event.target.select()
77-
document.execCommand('copy')
78-
7975
class Template
8076
constructor: (@element) ->
8177

0 commit comments

Comments
 (0)