Made IE text bug be detected through supportsGoodTextCharPos rather than browser sniffing
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2002 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -3862,8 +3862,8 @@ var textActions = canvas.textActions = function() {
|
||||
for(var i=0; i<len; i++) {
|
||||
var start = curtext.getStartPositionOfChar(i);
|
||||
var end = curtext.getEndPositionOfChar(i);
|
||||
// TODO: Make support property for this
|
||||
if(svgedit.browser.isIE()) {
|
||||
|
||||
if(!svgedit.browser.supportsGoodTextCharPos()) {
|
||||
var offset = canvas.contentW * current_zoom;
|
||||
start.x -= offset;
|
||||
end.x -= offset;
|
||||
@@ -8783,32 +8783,4 @@ this.getPrivateMethods = function() {
|
||||
return obj;
|
||||
};
|
||||
|
||||
(function() {
|
||||
// Temporary fix until MS fixes:
|
||||
// https://connect.microsoft.com/IE/feedback/details/599257/
|
||||
var disableAdvancedTextEdit = function() {
|
||||
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;
|
||||
}
|
||||
|
||||
if (!svgedit.browser.supportsTextCharPos()) {
|
||||
disableAdvancedTextEdit();
|
||||
}
|
||||
})();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user