Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#13449 closed defect (fixed)

dojox.form.Manager - observer is not valid HTML5 attribute

Reported by: Maastermedia Owned by: dylan
Priority: low Milestone: 1.9
Component: DojoX Form Version: 1.7.0b1
Keywords: dojox.form.Manager Cc:
Blocked By: Blocking:

Description

Observer is not html5 valid attribute. I think it should be nice to also use html5 valid one (data-dojo-observer) or use data-dojo-props when it gets available on subnodes:

See #12820

Change History (8)

comment:1 Changed 7 years ago by dylan

Milestone: tbd1.9
Owner: changed from dante to dylan
Status: newassigned

I would like to nominate this for 1.9, as it's blocking HTML5 validity.

comment:2 Changed 7 years ago by dylan

I tried the following as a potential fix, but it didn't pass the tests when I added data-dojo-observer in place of observer:

Index: _NodeMixin.js
===================================================================
--- _NodeMixin.js       (revision 29906)
+++ _NodeMixin.js       (working copy)
@@ -75,7 +75,11 @@
                getObserversFromNode = function(name){
                        var observers = {};
                        aa(function(_, n){
-                               var o = domAttr.get(n, "observer");
+                               // This allows us to use data-dojo-observer, but doesn't 
+                               // support data-dojo-props, which won't be supported on nested 
+                               // widgets until Dijit 2.0, see 
+                               // http://bugs.dojotoolkit.org/ticket/12820
+                               var o = domAttr.get(n, "data-dojo-observer" || "observer");
                                if(o && typeof o == "string"){
                                        array.forEach(o.split(","), function(o){
                                                o = lang.trim(o);

I'm going to open a few other tickets on things I noticed.

Last edited 6 years ago by bill (previous) (diff)

comment:3 Changed 6 years ago by bitpshr

Related: #16288 (pending review)

Using data-dojo-observer is passing the tests now, as of http://bugs.dojotoolkit.org/attachment/ticket/16288/patch_16288.5.diff

comment:4 Changed 6 years ago by dylan

In [30780]:

refs #16288 #16289 #13449, AMD clean-up and refactor for dojox/form/manager

comment:5 Changed 6 years ago by dylan

Resolution: fixed
Status: assignedclosed

Landed, thanks @bitpshr for helping finish this one off. I'm closing it out.

comment:6 Changed 6 years ago by dylan

In [30945]:

refs #13449, make sure observer is still supported in form manager

comment:7 Changed 6 years ago by dylan

In [30947]:

refs #13449, make sure observer is still supported in form manager

comment:8 Changed 6 years ago by dylan

In [31064]:

refs #13449, more work to try and fix data-dojo-observer correctly for form manager

Note: See TracTickets for help on using tickets.