#5464 closed defect (fixed)
dojo.isDescendant returns -1 on errors
Reported by: | tk | Owned by: | Adam Peller |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Core | Version: | 1.0 |
Keywords: | Cc: | Adam Peller | |
Blocked By: | Blocking: |
Description
Per Adam, here's a ticket for this. dojo.isDescendant returns -1 if one of the args is invalid and causes an error. This breaks things like (dojo.isDescendant())?true:false since -1 will force this into the "true" branch.
this ticket refs #5425 (it is what caused that problem)
Change History (10)
comment:1 Changed 13 years ago by
Milestone: | → 1.1 |
---|---|
Owner: | changed from anonymous to alex |
comment:2 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 13 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
sorry, but why return false if it's going to happen in the next line anyway?
comment:4 Changed 13 years ago by
I spoke with Alex and that was the change that was discussed and ok'd.
comment:5 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:6 Changed 13 years ago by
The -1 return code from dojo.isDescendant() is from [10981], to fix http://trac.dojotoolkit.org/ticket/4307#comment:8 (which was a show-stopper issue). It doesn't seem to be an issue anymore though, presumably because we stopped using tables in the input widget templates. Keep your fingers crossed.
comment:7 Changed 13 years ago by
Milestone: | 1.1 → 1.0.3 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Version: | 0.9 → 1.0 |
user reports that this prevented their tooltips from closing under certain situations. put fix in 1.0.x branch
comment:8 Changed 13 years ago by
Owner: | changed from alex to Adam Peller |
---|---|
Status: | reopened → new |
comment:9 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This seems to stem from [10981]. Alex, was the return -1 intentional? It seems like we're better off letting the exception get squelched and just return false? I'd say we could just do an object check instead of the try/catch, but there's probably some browser quirk reason for doing so.