Custom Query (18300 matches)


Show under each result:

Results (148 - 150 of 18300)

Ticket Resolution Summary Owner Reporter
#1881 fixed dojo.lfx.html.explode can cause exception Bryan Forbes ornus

dojo.lfx.html.explode expects the 1st argument ("start") to be a DOM node. However the method sometimes is called with no start or end nodes being replaced by an object holding coordinates. For example dojo.lfx.toggle.explode can pass such an object.

dojo.lfx.html.explode looks for style in the "start" argument. If there's no such attribute an *null* exception will be thrown.

To see the problem open "testswidget est_Menu2.html" and right-click on the tree. A context menu should be shown, but exception is thrown instead.

#1911 invalid Inconsistent getMarginBox , setContentBox, etc... behavior across browsers! Bryan Forbes Jonathan Bond-Caron

I've only tested getMarginBox, getBorderBox & setContentBox.

But these core functions return different values across Firefox, Opera & IE 6.0 I'll attach a test case...

This likely affects Safari as well... Browsers do their best with standards but the toolkit should fix these problems.. I'd be happy to do some research and submit a patch but I need to know if that has been addressed before?


#1972 wontfix dojo.html.removeClass() doesn't work properly when allowPartialMatches is true Bryan Forbes [email protected]

When trying to clear a set of classes from an HTML element, I found that dojo.html.removeClass() doesn't work properly in 0.4. I believe it did work properly in 0.3.1.

I looked into it and it turns out that the probably faster .replace() call for allowPartialMatches == true only replaces the passed in classStr exactly once. In other words, if obj has className set to "blah noblah" calling dojo.html.replaceClass(obj, 'no', true) would result in className being set to "blah blah". Obviously not what I was looking for.

The following patch fixes it.

--- style.js    (revision 213)
+++ style.js    (working copy)
@@ -92,7 +92,7 @@
                if (!allowPartialMatches) {
                        var newcs = dojo.html.getClass(node).replace(new RegExp('(^|\s+)'+classStr+'(\s+|$)'), "$1$2");
                } else {
-                       var newcs = dojo.html.getClass(node).replace(classStr,'');
+                       var newcs = dojo.html.getClass(node).replace(new RegExp('(^|\s+)(?:'+classStr+'\S*(?:\s+|$)?)+(\s+|$)','g'), "$1$2");
                dojo.html.setClass(node, newcs);

Yeah, the RegExp? is a tad more complicated (heh) but I believe it works properly in all cases. The extra (?:\s+|$)? in there allows for repeated strings, like blah noblah noimage, which with out that nastiness just did blah noimage`.

By the way, the revision number is from our internal project, not Dojo.


Note: See TracQuery for help on using queries.