Disabled inbuilt advanced text editing for IE9 until a bug is fixed
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1722 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
5d67a1a1d8
commit
dea7b5c896
|
@ -1469,7 +1469,10 @@
|
|||
$('#font_size').val(elem.getAttribute("font-size"));
|
||||
$('#text').val(elem.textContent);
|
||||
if (svgCanvas.addedNew) {
|
||||
$('#text').focus().select();
|
||||
// Timeout needed for IE9
|
||||
setTimeout(function() {
|
||||
$('#text').focus().select();
|
||||
},100);
|
||||
}
|
||||
} // text
|
||||
else if(el_name == 'image') {
|
||||
|
|
|
@ -11095,7 +11095,28 @@ this.getPrivateMethods = function() {
|
|||
return obj;
|
||||
};
|
||||
|
||||
// console.log('canvas.getPrivateMethods',canvas.getPrivateMethods);
|
||||
// Temporary fix until MS fixes:
|
||||
// https://connect.microsoft.com/IE/feedback/details/599257/
|
||||
function disableAdvancedTextEdit() {
|
||||
var curtext;
|
||||
var textInput = $('#text').css({
|
||||
position: 'static'
|
||||
});
|
||||
|
||||
$.each(['mouseDown','mouseUp','mouseMove', 'setCursor', 'init', 'select', 'toEditMode'], function() {
|
||||
textActions[this] = $.noop;
|
||||
});
|
||||
|
||||
textActions.init = function(elem) {
|
||||
curtext = elem;
|
||||
$(curtext).unbind('dblclick').bind('dblclick', function() {
|
||||
textInput.focus();
|
||||
});
|
||||
}
|
||||
|
||||
canvas.textActions = textActions;
|
||||
|
||||
}
|
||||
|
||||
// Test support for features/bugs
|
||||
(function() {
|
||||
|
@ -11118,6 +11139,19 @@ this.getPrivateMethods = function() {
|
|||
support.pathInsertItemBefore = false;
|
||||
}
|
||||
|
||||
var text = document.createElementNS(svgns,'text');
|
||||
text.textContent = 'a';
|
||||
|
||||
// text character positioning
|
||||
try {
|
||||
text.getStartPositionOfChar(0);
|
||||
support.textCharPos = true;
|
||||
} catch(err) {
|
||||
support.textCharPos = false;
|
||||
|
||||
disableAdvancedTextEdit();
|
||||
}
|
||||
|
||||
// TODO: Find better way to check support for this
|
||||
support.editableText = isOpera;
|
||||
|
||||
|
|
Loading…
Reference in New Issue