mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
Added test for issue #3141
This commit is contained in:
parent
a23f0d3a0e
commit
ba9d5a47e5
2 changed files with 17 additions and 0 deletions
|
|
@ -44,4 +44,20 @@
|
|||
ok( success, "mousedown executed without exception");
|
||||
}
|
||||
});
|
||||
|
||||
// Test for issue #3141:
|
||||
test( "elements of input[type='submit'] with data-role='button' should not be doubly enhanced", function(){
|
||||
var button = $("#double-enhanced"),
|
||||
count = 0;
|
||||
|
||||
button.bind('vclick', function() {
|
||||
count++;
|
||||
});
|
||||
|
||||
button.trigger('vclick');
|
||||
|
||||
ok( count === 1, "events don't trigger twice");
|
||||
|
||||
ok( !button.hasClass('ui-btn') && !button.children().length, "input not styled like button and contains no children");
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
<div data-nstest-role="page" id="default">
|
||||
<div data-nstest-role="content" id="control-group-content">
|
||||
<input type="submit" data-nstest-role="button" value="Double Enhanced?" id="double-enhanced" />
|
||||
<a href="index.html" data-nstest-role="button" data-nstest-shadow="false">No shadow</a>
|
||||
<a href="index.html" data-nstest-role="button" data-nstest-corners="false">No corners</a>
|
||||
<a href="index.html" data-nstest-role="button" data-nstest-shadow="false" data-nstest-corners="false">No shadow or corners</a>
|
||||
|
|
|
|||
Loading…
Reference in a new issue