Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fixed some weird bugs in IE.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Feb 22, 2009
1 parent f3b46fb commit 9c26aac
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Source/MooEditable/MooEditable.js
Expand Up @@ -175,12 +175,10 @@ var MooEditable = new Class({
// IE fired load event twice if designMode is set
(Browser.Engine.trident) ? this.doc.body.contentEditable = true : this.doc.designMode = 'On';

// document.window for IE, for new Document code below
if (Browser.Engine.trident) this.doc.window = this.win;

// Mootoolize document and Element
// Mootoolize window, document and body
if (!this.win.$family) new Window(this.win);
if (!this.doc.$family) new Document(this.doc);
$extend(this.win.Element.prototype, Element.Prototype);
$(this.doc.body);

// Bind keyboard shortcuts
this.doc.addEvents({
Expand Down Expand Up @@ -349,7 +347,7 @@ var MooEditable = new Class({
if ($type(el) != 'element') break;
for (var prop in states.css){
var css = states.css[prop];
if (Element.getStyle(el, prop).contains(css)) item.activate(css);
if ($(el).getStyle(prop).contains(css)) item.activate(css);
}
}
while (el = el.parentNode);
Expand Down Expand Up @@ -786,7 +784,7 @@ MooEditable.UI.Toolbar= new Class({
var type = act.type || 'button';
var item = new MooEditable.UI[type.camelCase().capitalize()]($extend(act.options, {
name: action,
'class': action + '-item toolbar-' + type,
'class': action + '-item toolbar-' + type + ' toolbar-item',
onAction: self.itemAction.bind(self)
}));
this.items.push(item);
Expand Down

0 comments on commit 9c26aac

Please sign in to comment.