Skip to content

Commit 7985a5f

Browse files
committed
Exclude Ctrl+Enter on iOS and iPadOS due to conflicts
1 parent 4a06cc9 commit 7985a5f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/try_ruby.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ def initialize
6262

6363
#If hold down the control and the Enter key goes down, run
6464
$document.on :keydown, '#editor' do |e|
65-
if e.key == "Enter" && (e.ctrl? || (@navigator.user_agent&.match?(/\b(Mac|iPad|iPhone|iPod)\b/) && e.meta?))
65+
if e.key == "Enter" && ((e.ctrl? && !@navigator.user_agent&.match?(/\b(iPad|iPhone|iPod)\b/)) ||
66+
(@navigator.user_agent&.match?(/\b(Mac|iPad|iPhone|iPod)\b/) && e.meta?))
6667
e.prevent
6768
do_run
6869
end

0 commit comments

Comments
 (0)