Update Codemirror version to the latest which allows us to set screen reader labels on Codemirror editor.

refs #5197
This commit is contained in:
Aditya Toshniwal
2020-06-08 12:26:12 +05:30
committed by Akshay Joshi
parent 92d9c41da7
commit eb971a0320
7 changed files with 13 additions and 5 deletions

View File

@@ -1810,12 +1810,15 @@ define([
// Use the Backform Control's render function
Backform.Control.prototype.render.apply(this, arguments);
var field = _.defaults(this.field.toJSON(), this.defaults);
this.sqlCtrl = CodeMirror.fromTextArea(
(this.$el.find('textarea')[0]), {
lineNumbers: true,
mode: 'text/x-pgsql',
readOnly: true,
extraKeys: pgAdmin.Browser.editor_shortcut_keys,
screenReaderLabel: field.label,
});
this.reflectPreferences();
@@ -2574,6 +2577,7 @@ define([
lineNumbers: true,
mode: 'text/x-pgsql',
extraKeys: pgAdmin.Browser.editor_shortcut_keys,
screenReaderLabel: data.label,
});
self.reflectPreferences();