We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a995cf3 commit 4a06cc9Copy full SHA for 4a06cc9
app/dependencies.rb
@@ -6,3 +6,4 @@
6
require 'browser/http'
7
require 'browser/location'
8
require 'browser/history'
9
+require 'browser/navigator'
app/try_ruby.rb
@@ -32,6 +32,7 @@ def initialize
32
@current_item = nil
33
@current_copycode = nil
34
@updating = false
35
+ @navigator = $window.navigator
36
37
initialize_menu
38
@@ -61,7 +62,7 @@ def initialize
61
62
63
#If hold down the control and the Enter key goes down, run
64
$document.on :keydown, '#editor' do |e|
- if e.key == "Enter" && e.ctrl?
65
+ if e.key == "Enter" && (e.ctrl? || (@navigator.user_agent&.match?(/\b(Mac|iPad|iPhone|iPod)\b/) && e.meta?))
66
e.prevent
67
do_run
68
end
0 commit comments