Skip to content

Commit 950581e

Browse files
author
Aaron Cannon
committed
Changed TinyMCE help shortcut key to ALT+F8
Fixes CNVS-1802 Test plan: - Visit an RCE editor in Canvas. - Press ALT+F8 to confirm that the help dialog appears. - Using a screen reader, verify that the user is told that they can press ALT+F8 to get help. Change-Id: I068c6f519df7ebaa94ffb846a82b5d48667954f4 Reviewed-on: https://gerrit.instructure.com/31745 Tested-by: Jenkins <jenkins@instructure.com> QA-Review: Matt Fairbourn <mfairbourn@instructure.com> Reviewed-by: Derek DeVries <ddevries@instructure.com> Product-Review: Aaron Cannon <acannon@instructure.com>
1 parent b2f1078 commit 950581e

4 files changed

Lines changed: 25 additions & 6 deletions

File tree

app/coffeescripts/editor/editorAccessibility.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ define [
3737
@$el.find("##{@id_prepend}_instructure_record img").attr('alt') + ", " + I18n.t('accessibles.record', 'This feature is inaccessible for screen readers.'));
3838

3939
_addTitles: ->
40-
@$iframe.attr 'title', I18n.t('titles.rte_help', 'Rich Text Area. Press ALT F10 for toolbar. Press ALT 0 for help.')
40+
@$iframe.attr 'title', I18n.t('titles.rte_help', 'Rich Text Area. Press ALT F10 for toolbar. Press ALT F8 for help.')

app/coffeescripts/editor/stocktiny.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ define [
44
'tinymce/jscripts/tiny_mce/tiny_mce_src'
55
'tinymce/jscripts/tiny_mce/langs/en'
66
'tinymce/jscripts/tiny_mce/themes/advanced/langs/en'
7-
'tinymce/jscripts/tiny_mce/themes/advanced/editor_template'
7+
'tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src'
88
'tinymce/jscripts/tiny_mce/plugins/media/editor_plugin_src'
99
'tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src'
1010
'tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg'

public/javascripts/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Contributing: http://tinymce.moxiecode.com/contributing
99
*/
1010

11-
(function(tinymce) {
11+
define(['tinymce/jscripts/tiny_mce/tiny_mce_src'], function(tinymce) {
1212
var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
1313

1414
// Generates a preview for a format
@@ -726,7 +726,10 @@
726726
});
727727

728728
// alt+0 is the UK recommended shortcut for accessing the list of access controls.
729-
ed.addShortcut('alt+0', '', 'mceShortcuts', t);
729+
// Instructure:
730+
// Unfortunately, it creates a conflict with a foreign character on the Mac.
731+
// Also, this standard has really failed to catch on, so we use something else.
732+
ed.addShortcut('alt+f8', '', 'mceShortcuts', t);
730733

731734
return {
732735
iframeContainer : ic,
@@ -1487,4 +1490,4 @@
14871490
});
14881491

14891492
tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
1490-
}(tinymce));
1493+
});

public/javascripts/tinymce/jscripts/tiny_mce/tiny_mce_src.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12937,6 +12937,22 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
1293712937
o[v] = true;
1293812938
break;
1293912939

12940+
// Instructure: Added handling of F1-F12 keys.
12941+
case 'f1':
12942+
case 'f2':
12943+
case 'f3':
12944+
case 'f4':
12945+
case 'f5':
12946+
case 'f6':
12947+
case 'f7':
12948+
case 'f8':
12949+
case 'f9':
12950+
case 'f10':
12951+
case 'f11':
12952+
case 'f12':
12953+
o.keyCode = 111 + parseInt(v.substr(1), 10);
12954+
break;
12955+
1294012956
default:
1294112957
o.charCode = v.charCodeAt(0);
1294212958
o.keyCode = v.toUpperCase().charCodeAt(0);
@@ -17770,4 +17786,4 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
1777017786
})(tinymce);
1777117787

1777217788
return this.tinyMCE;
17773-
});
17789+
});

0 commit comments

Comments
 (0)