Fix object controls not working in IE8. Closes #92.

This commit is contained in:
kangax 2012-01-26 19:39:30 -05:00
parent c57791e633
commit 3d6ae8442f
7 changed files with 820 additions and 791 deletions

View file

@ -1,6 +1,6 @@
/*! Fabric.js Copyright 2008-2012, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
var fabric = fabric || { version: "0.7.13" };
var fabric = fabric || { version: "0.7.14" };
if (typeof exports != 'undefined') {
exports.fabric = fabric;

1589
dist/all.js vendored

File diff suppressed because it is too large Load diff

4
dist/all.min.js vendored

File diff suppressed because one or more lines are too long

BIN
dist/all.min.js.gz vendored

Binary file not shown.

View file

@ -1,7 +1,7 @@
{
"name": "fabric",
"description": "Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.",
"version": "0.7.13",
"version": "0.7.14",
"author": "Juriy Zaytsev <kangax@gmail.com>",
"keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"],
"repository": "git://github.com/kangax/fabric.js",

View file

@ -266,7 +266,8 @@
__onMouseDown: function (e) {
// accept only left clicks
if (e.which !== 1 && !fabric.isTouchSupported) return;
var isLeftClick = 'which' in e ? e.which == 1 : e.button == 1;
if (!isLeftClick && !fabric.isTouchSupported) return;
if (this.isDrawingMode) {
this._prepareForDrawing(e);

View file

@ -224,14 +224,13 @@
// Cufon doesn't play nice with textDecoration=underline if element doesn't have a parent
container.appendChild(el);
//IE 7 & 8 drop newLines and white space on text nodes, due to a bug as disccused here
//and here http://web.student.tuwien.ac.at/~e0226430/innerHtmlQuirk.html
//http://www.w3schools.com/dom/dom_mozilla_vs_ie.asp
if (typeof G_vmlCanvasManager == 'undefined') {
el.innerHTML = this.text;
} else {
//for some reason, the carriage return is not stripped by IE but "\n" is, so let's keep \r as a new line marker...
}
else {
// IE 7 & 8 drop newlines and white space on text nodes
// see: http://web.student.tuwien.ac.at/~e0226430/innerHtmlQuirk.html
// see: http://www.w3schools.com/dom/dom_mozilla_vs_ie.asp
el.innerText = this.text.replace(/\r?\n/gi, '\r');
}