Bladeren bron

Change alt+rarr shortcut to alt+f

Avoid conflict with OS X text input keyboard navigation
Thibaut 11 jaren geleden
bovenliggende
commit
2cae43f4e8

+ 2 - 2
assets/javascripts/app/shortcuts.coffee

@@ -100,11 +100,11 @@ class app.Shortcuts
       when 38
         @trigger 'altUp'
         false
-      when 39
-        @trigger 'altRight', event
       when 40
         @trigger 'altDown'
         false
+      when 70
+        @trigger 'altF', event
       when 71
         @trigger 'altG'
         false

+ 1 - 1
assets/javascripts/templates/pages/help_tmpl.coffee

@@ -78,7 +78,7 @@ app.templates.helpPage = """
   <h3 class="_shortcuts-title">Misc</h3>
   <dl class="_shortcuts-dl">
     <dt class="_shortcuts-dt">
-      <code class="_shortcut-code">alt + &rarr;</code>
+      <code class="_shortcut-code">alt + f</code>
     <dd class="_shortcuts-dd">Focus first link in the content area<br>(press tab to focus the other links)
     <dt class="_shortcuts-dt">
       <code class="_shortcut-code">alt + r</code>

+ 2 - 2
assets/javascripts/views/content/content.coffee

@@ -12,7 +12,7 @@ class app.views.Content extends app.View
     pageDown: 'scrollPageDown'
     home:     'scrollToTop'
     end:      'scrollToBottom'
-    altRight:   'onAltRight'
+    altF:     'onAltF'
 
   @routes:
     before: 'beforeRoute'
@@ -151,7 +151,7 @@ class app.views.Content extends app.View
       $.popup(link)
     return
 
-  onAltRight: (event) =>
+  onAltF: (event) =>
     unless document.activeElement and $.hasChild @el, document.activeElement
       @findByTag('a')?.focus()
       $.stopEvent(event)