Bug Tracker

Custom Query (13852 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (31 - 33 of 13852)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Ticket Resolution Summary Owner Reporter
#15214 notabug Bug with .clone() data types jlevene jlevene
Description

According to jquery documentation, a data attribute is an object, however .clone() converts these to a "[object]" string.

example:

$(element).data("stuff", {"field1":"1", "field2":"2"});
cloned = $(element).clone();
alert(JSON.stringify(cloned.data("stuff"));

Also creating an element using jquery converts the data to a string as well.

$("<div>", {
"data-stuff" : {"field1":"1", "field2":"2"})
.appendTo(body);
alert(JSON.stringify($("div").data("stuff"));
#15213 migrated Calling .empty() on a disabled callbacks object re-enables it TheDistantSea
Description

Earlier today I answered this StackOverflow question, wherein this behavior is shown:

var c = $.Callbacks();
var f = /* some function */;
c.disable();
c.empty();
c.add(f);
c.disabled(); // of course true
c.fire(); // invokes f!

This behavior occurs in all versions of jQuery I tested (latest 1.9, 1.10, 1.11, 2.0, 2.1) -- here's a fiddle to easily reproduce it.

The problem is that .disable() relies on setting internal variables of the callbacks object to undefined, and while most other methods such as .add() test and this condition and abort if true, .empty() itself does not. Instead it resets some of those variables, which causes the abort test in the other methods to erroneously pass and ultimately for callbacks to be added to and invoked by a disabled object.

#15212 notabug submit function out of document ready is called first, irrespective of the order (line number on page) thesahiljain
Description

As we know that code written under document ready is just to assure that the dom elements has been loaded. But in my case , i have written a form submit function in document ready and after document ready close i have written another form submit. The expected behaviour from this is that the submit function which comes first should be called first. But here it shows unexpected behaviour. The submit function written after is called first.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Note: See TracQuery for help on using queries.