#1114 closed defect (fixed)
[patch] Editor2, shared floating Toolbar and MSIE
Reported by: | guest | Owned by: | liucougar |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.3 |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description
Hi! I have positioning-woes in IE6 with dojo 0.3.1 when inserting a custom Toolbar into the page and setting the following: shareToolbar => true, toolbarAlwaysVisible => true, useActiveX => false.
The following patch works for me (TM).
--- src/widget/Editor2.js 2006-06-12 23:18:27.000000000 +0200 +++ src/widget/Editor2.js 2006-07-11 18:27:38.625474671 +0200 @@ -39,7 +39,6 @@ toolbarWidget: null, scrollInterval: null, - editorOnLoad: function(){ var toolbars = dojo.widget.byType("Editor2Toolbar"); if((!toolbars.length)||(!this.shareToolbar)){ @@ -55,13 +54,6 @@ this.tbBgIframe.iframe.style.height = "30px"; } - // need to set position fixed to wherever this thing has landed - if(this.toolbarAlwaysVisible){ - var src = document["documentElement"]||window; - this.scrollInterval = setInterval(dojo.lang.hitch(this, "globalOnScrollHandler"), 100); - // dojo.event.connect(src, "onscroll", this, "globalOnScrollHandler"); - dojo.event.connect("before", this, "destroyRendering", this, "unhookScroller"); - } }else{ // FIXME: should we try harder to explicitly manage focus in // order to prevent too many editors from all querying @@ -70,11 +62,22 @@ // selection in the others. This is problematic. this.toolbarWidget = toolbars[0]; } + // need to set position fixed to whereever this thing has landed + if(this.toolbarAlwaysVisible){ + var src = document["documentElement"]||window; + this.scrollInterval = setInterval(dojo.lang.hitch(this, "globalOnScrollHandler"), 100); + // dojo.event.connect(src, "onscroll", this, "globalOnScrollHandler"); + dojo.event.connect("before", this, "destroyRendering", this, "unhookScroller"); + } + dojo.event.topic.registerPublisher("Editor2.clobberFocus", this.editNode, "onfocus"); // dojo.event.topic.registerPublisher("Editor2.clobberFocus", this.editNode, "onclick"); dojo.event.topic.subscribe("Editor2.clobberFocus", this, "setBlur"); dojo.event.connect(this.editNode, "onfocus", this, "setFocus"); - dojo.event.connect(this.toolbarWidget.linkButton, "onclick", + + var node; + if(node = this.toolbarWidget.linkButton) { + dojo.event.connect(node, "onclick", dojo.lang.hitch(this, function(){ var range; if(this.document.selection){ @@ -90,6 +93,7 @@ } }) ); + } var focusFunc = dojo.lang.hitch(this, function(){ if(dojo.render.html.ie){ @@ -159,7 +163,7 @@ if(!this._scrollSetUp){ this._scrollSetUp = true; var editorWidth = ds.getOuterWidth(this.domNode); - this._scrollThreshold = ds.abs(tdn, false).y; + this._scrollThreshold = ds.abs(tdn, true).y; // dojo.debug("threshold:", this._scrollThreshold); if((isIE)&&(db)&&(ds.getStyle(db, "background-image")=="none")){ with(db.style){ @@ -204,7 +208,7 @@ // position of the bottom-most editor instance. if(!dojo.render.html.safari){ // safari reports a bunch of things incorrectly here - var eHeight = (this.height) ? parseInt(this.height) : ((this.object) ? dojo.style.getInnerHeight(this.editNode) : this._lastHeight); + var eHeight = (this.height) ? parseInt(this.height) : dojo.style.getInnerHeight(this.editNode); if(scrollPos > (this._scrollThreshold+eHeight)){ tdn.style.display = "none"; }else{ @@ -218,9 +222,6 @@ position = ""; top = ""; zIndex = ""; - if(isIE){ - marginTop = ""; - } } if(isIE){ dojo.html.removeClass(tdn, "IEFixedToolbar");
TIA
Hannes
Change History (8)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Cc: | [email protected]… removed |
---|
CLA should be in your Fax-Tray now :)
comment:4 Changed 15 years ago by
BTW: attaching the patch to the ticket is a better way for submitting patches
comment:5 Changed 15 years ago by
Milestone: | → 0.4 |
---|---|
Summary: | Editor2, shared floating Toolbar and MSIE → [patch] Editor2, shared floating Toolbar and MSIE |
CLA confirmed on file
comment:6 Changed 15 years ago by
Owner: | changed from bill to liucougar |
---|
Note: See
TracTickets for help on using
tickets.
We appreciate the patch but we need you to sign a CLA before we can even look at your patch