Prevent U keystroke from landing in the source editor

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@314 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Jeff Schiller
2009-07-13 03:02:29 +00:00
parent d1a011d5d3
commit 5ce77bca33

View File

@@ -422,6 +422,7 @@ function svg_edit_setup() {
$('#svg_source_textarea').val(str); $('#svg_source_textarea').val(str);
$('#svg_source_editor').fadeIn(); $('#svg_source_editor').fadeIn();
properlySourceSizeTextArea(); properlySourceSizeTextArea();
$('#svg_source_textarea').focus();
}; };
var properlySourceSizeTextArea = function(){ var properlySourceSizeTextArea = function(){
@@ -438,12 +439,12 @@ function svg_edit_setup() {
} }
$('#svg_source_editor').hide(); $('#svg_source_editor').hide();
editingsource = false; editingsource = false;
$('#svg_source_textarea').blur();
}; };
// TODO: add canvas-centering code in here // TODO: add canvas-centering code in here
$(window).resize(function(evt) { $(window).resize(function(evt) {
if (!editingsource) return; if (!editingsource) return;
properlySourceSizeTextArea(); properlySourceSizeTextArea();
}); });
@@ -524,7 +525,7 @@ function svg_edit_setup() {
$(document).bind('keydown', {combi:'z', disableInInput: true}, clickUndo); $(document).bind('keydown', {combi:'z', disableInInput: true}, clickUndo);
$(document).bind('keydown', {combi:'shift+z', disableInInput: true}, clickRedo); $(document).bind('keydown', {combi:'shift+z', disableInInput: true}, clickRedo);
$(document).bind('keydown', {combi:'y', disableInInput: true}, clickRedo); $(document).bind('keydown', {combi:'y', disableInInput: true}, clickRedo);
$(document).bind('keydown', {combi:'u', disableInInput: true}, showSourceEditor); $(document).bind('keydown', {combi:'u', disableInInput: true}, function(evt){showSourceEditor();evt.preventDefault();});
$(document).bind('keydown', {combi:'esc', disableInInput: false}, hideSourceEditor); $(document).bind('keydown', {combi:'esc', disableInInput: false}, hideSourceEditor);
// temporary binding to test setSvgString() // temporary binding to test setSvgString()
/* /*