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-75d572ba1ddd
This commit is contained in:
@@ -1469,7 +1469,10 @@
|
|||||||
$('#font_size').val(elem.getAttribute("font-size"));
|
$('#font_size').val(elem.getAttribute("font-size"));
|
||||||
$('#text').val(elem.textContent);
|
$('#text').val(elem.textContent);
|
||||||
if (svgCanvas.addedNew) {
|
if (svgCanvas.addedNew) {
|
||||||
$('#text').focus().select();
|
// Timeout needed for IE9
|
||||||
|
setTimeout(function() {
|
||||||
|
$('#text').focus().select();
|
||||||
|
},100);
|
||||||
}
|
}
|
||||||
} // text
|
} // text
|
||||||
else if(el_name == 'image') {
|
else if(el_name == 'image') {
|
||||||
|
|||||||
@@ -11095,7 +11095,28 @@ this.getPrivateMethods = function() {
|
|||||||
return obj;
|
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
|
// Test support for features/bugs
|
||||||
(function() {
|
(function() {
|
||||||
@@ -11118,6 +11139,19 @@ this.getPrivateMethods = function() {
|
|||||||
support.pathInsertItemBefore = false;
|
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
|
// TODO: Find better way to check support for this
|
||||||
support.editableText = isOpera;
|
support.editableText = isOpera;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user