[dojo-contributors] Re: [Fwd: [Dojo-checkins] psowden - r4498 - trunk/src/widget]

LiuCougar liucougar at gmail.com
Sun Jun 25 20:56:03 EDT 2006


if using mouse clicking to select an item, it disappers

however, if using up/down arrow keys to select one and hitting enter
to select it, the list does not disappear. I checked, this is not an
regression introduced with this patch (it is the case in
http://archive.dojotoolkit.org/dojo-2006-06-25/tests/widget/test_Select.html)

attached is a patch to correct this

On 6/26/06, Bill Keese <bill at dojotoolkit.org> wrote:
> ok, i checked it in.  doesn't really seem to work perfectly though.
> after i select something from the drop down list, the drop down list
> doesn't disappear.
>
> LiuCougar wrote:
> > btw: have a look at the patch for 1017:
> > http://trac.dojotoolkit.org/ticket/1017
> >
> > Under FF/Windows, it works fine now with that patch
> >
> > however, I can imagine you may have issues under linux to
> > trigger/switch to Japanese input mode.
> >
> > anyway please have a try
> >
> > On 6/25/06, LiuCougar <liucougar at gmail.com> wrote:
> >> closed
> >>
> >> thanks
> >>
> >> On 6/25/06, Bill Keese <bill at dojotoolkit.org> wrote:
> >> > Aren't you going to close the bug?
> >> >
> >> > -------- Original Message --------
> >> > Subject: [Dojo-checkins] psowden - r4498 - trunk/src/widget
> >> > Date: Sat, 24 Jun 2006 11:18:04 -0600 (MDT)
> >> > From: dojo-checkins-admin at dojotoolkit.org
> >> > To: dojo-checkins at dojotoolkit.org
> >> >
> >> > Author: psowden
> >> > Date: Sat Jun 24 11:18:03 2006
> >> > New Revision: 4498
> >> >
> >> > Modified:
> >> >     trunk/src/widget/Editor2.js
> >> > Log:
> >> > patch from Heng Lui.
> >> >
> >> > fixes bug 1018.
> >> >
> >> >
> >> > Modified: trunk/src/widget/Editor2.js
> >> >
> >> ==============================================================================
> >>
> >> > --- trunk/src/widget/Editor2.js (original)
> >> > +++ trunk/src/widget/Editor2.js Sat Jun 24 11:18:03 2006
> >> > @@ -11,6 +11,9 @@
> >> >   // dojo.require("dojo.widget.ColorPalette");
> >> >   // dojo.require("dojo.string.extras");
> >> >
> >> > +//The current focused Editor2 Instance
> >> > +dojo.widget.Editor2._CurrentInstance = null;
> >> > +
> >> >   dojo.widget.defineWidget(
> >> >         "dojo.widget.html.Editor2",
> >> >         dojo.widget.html.RichText,
> >> > @@ -60,10 +63,8 @@
> >> >                                 //                      selection in
> >> the others. This is problematic.
> >> >                                 this.toolbarWidget = toolbars[0];
> >> >                         }
> >> > -
> >> dojo.event.topic.registerPublisher("Editor2.clobberFocus",
> >> > this.editNode, "onfocus");
> >> > -                       //
> >> dojo.event.topic.registerPublisher("Editor2.clobberFocus",
> >> > this.editNode, "onclick");
> >> > +
> >> dojo.event.topic.registerPublisher("Editor2.clobberFocus", this,
> >> > "clobberFocus");
> >> >
> >> dojo.event.topic.subscribe("Editor2.clobberFocus", this, "setBlur");
> >> > -                       dojo.event.connect(this.editNode, "onfocus",
> >> this, "setFocus");
> >> >
> >> dojo.event.connect(this.toolbarWidget.linkButton, "onclick",
> >> >                                 dojo.lang.hitch(this, function(){
> >> >                                         var range;
> >> > @@ -102,6 +103,8 @@
> >> >                         }
> >> >                 },
> >> >
> >> > +               clobberFocus: function() {},
> >> > +
> >> >                 toggleHtmlEditing: function(){
> >> >                         if(!this._inHtmlMode){
> >> >                                 this._inHtmlMode = true;
> >> > @@ -126,8 +129,14 @@
> >> >                 },
> >> >
> >> >                 setFocus: function(){
> >> > -                       // dojo.debug("setFocus:", this);
> >> > -                       dojo.event.connect(this.toolbarWidget,
> >> "exec", this, "execCommand");
> >> > +                       if(dojo.widget.Editor2._CurrentInstance ==
> >> this){ return; }
> >> > +
> >> > +                       if(this.toolbarWidget){
> >> > +                               this.clobberFocus();
> >> > +                               // dojo.debug("setFocus:", this);
> >> > +                               dojo.widget.Editor2._CurrentInstance
> >> = this;
> >> > +
> >> dojo.event.connect(this.toolbarWidget, "exec", this, "execCommand");
> >> > +                       }
> >> >                 },
> >> >
> >> >                 setBlur: function(){
> >> > @@ -337,20 +346,6 @@
> >> >
> >> this.close(e.getName().toLowerCase() == "save");
> >> >                                 }
> >> >                         }
> >> > -               },
> >> > -
> >> > -               wireUpOnLoad: function(){
> >> > -                       if(!dojo.render.html.ie){
> >> > -                               /*
> >> > -                               dojo.event.kwConnect({
> >> > -                                       srcObj:         this.document,
> >> > -                                       srcFunc:        "click",
> >> > -                                       targetObj:
> >> this.toolbarWidget,
> >> > -                                       targetFunc:
> >> "hideAllDropDowns",
> >> > -                                       once:           true
> >> > -                               });
> >> > -                               */
> >> > -                       }
> >> >                 }
> >> >         },
> >> >         "html",
> >> > @@ -358,12 +353,6 @@
> >> >                 var cp = dojo.widget.html.Editor2.prototype;
> >> >                 if(!cp._wrappersSet){
> >> >                         cp._wrappersSet = true;
> >> > -                       cp.fillInTemplate = (function(fit){
> >> > -                               return function(){
> >> > -                                       fit.call(this);
> >> > -                                       this.editorOnLoad();
> >> > -                               };
> >> > -                       })(cp.fillInTemplate);
> >> >
> >> >                         cp.onDisplayChanged = (function(odc){
> >> >                                 return function(){
> >> > @@ -377,9 +366,16 @@
> >> >                         cp.onLoad = (function(ol){
> >> >                                 return function(){
> >> >                                         ol.call(this);
> >> > -                                       this.wireUpOnLoad();
> >> > +                                       this.editorOnLoad();
> >> >                                 };
> >> >                         })(cp.onLoad);
> >> > +
> >> > +                       cp.onFocus = (function(of){
> >> > +                               return function(){
> >> > +                                       of.call(this);
> >> > +                                       this.setFocus();
> >> > +                               };
> >> > +                       })(cp.onFocus);
> >> >                 }
> >> >         }
> >> >   );
> >> > _______________________________________________
> >> > Dojo-checkins mailing list
> >> > Dojo-checkins at dojotoolkit.org
> >> > http://dojotoolkit.org/mailman/listinfo/dojo-checkins
> >> >
> >> > --
> >> >
> >> > Bill
> >> >
> >>
> >>
> >> --
> >> "People's characters are strengthened through struggle against
> >> difficulties; they are weakened by comfort."
> >> - Old Chinese adage
> >>
> >
> >
>


-- 
"People's characters are strengthened through struggle against
difficulties; they are weakened by comfort."
- Old Chinese adage
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1017-2.patch
Type: application/octet-stream
Size: 688 bytes
Desc: not available
Url : http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20060626/a30ffb6d/attachment.dll 


More information about the dojo-contributors mailing list