Skip to content

Commit 5bd1965

Browse files
committed
Datepicker: Removed iframe cover for IE6.
1 parent d73edff commit 5bd1965

File tree

3 files changed

+10
-39
lines changed

3 files changed

+10
-39
lines changed

tests/unit/datepicker/datepicker_core.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,14 @@ test("widget method", function() {
4343
});
4444

4545
test('baseStructure', function() {
46-
expect( 59 );
46+
expect( 58 );
4747
var header, title, table, thead, week, panel, inl, child,
4848
inp = init('#inp').focus(),
49-
dp = $('#ui-datepicker-div'),
50-
iframe = ($.ui.ie6);
49+
dp = $('#ui-datepicker-div');
5150
ok(dp.is(':visible'), 'Structure - datepicker visible');
5251
ok(!dp.is('.ui-datepicker-rtl'), 'Structure - not right-to-left');
5352
ok(!dp.is('.ui-datepicker-multi'), 'Structure - not multi-month');
54-
equal(dp.children().length, 2 + (iframe ? 1 : 0), 'Structure - child count');
53+
equal(dp.children().length, 2, 'Structure - child count');
5554

5655
header = dp.children(':first');
5756
ok(header.is('div.ui-datepicker-header'), 'Structure - header division');
@@ -78,7 +77,6 @@ test('baseStructure', function() {
7877
equal(week.children().length, 7, 'Structure - week child count');
7978
ok(week.children(':first').is('td.ui-datepicker-week-end'), 'Structure - month table first day cell');
8079
ok(week.children(':last').is('td.ui-datepicker-week-end'), 'Structure - month table second day cell');
81-
ok(dp.children('iframe').length === (iframe ? 1 : 0), 'Structure - iframe');
8280
inp.datepicker('hide').datepicker('destroy');
8381

8482
// Editable month/year and button panel
@@ -100,7 +98,7 @@ test('baseStructure', function() {
10098
inp = init('#inp', {numberOfMonths: 2});
10199
inp.focus();
102100
ok(dp.is('.ui-datepicker-multi'), 'Structure multi [2] - multi-month');
103-
equal(dp.children().length, 3 + (iframe ? 1 : 0), 'Structure multi [2] - child count');
101+
equal(dp.children().length, 3, 'Structure multi [2] - child count');
104102
child = dp.children(':first');
105103
ok(child.is('div.ui-datepicker-group') && child.is('div.ui-datepicker-group-first'), 'Structure multi [2] - first month division');
106104
child = dp.children(':eq(1)');
@@ -121,7 +119,7 @@ test('baseStructure', function() {
121119
inp = init('#inp', {numberOfMonths: [2, 2]});
122120
inp.focus();
123121
ok(dp.is('.ui-datepicker-multi'), 'Structure multi - multi-month');
124-
equal(dp.children().length, 6 + (iframe ? 1 : 0), 'Structure multi [2,2] - child count');
122+
equal(dp.children().length, 6, 'Structure multi [2,2] - child count');
125123
child = dp.children(':first');
126124
ok(child.is('div.ui-datepicker-group') && child.is('div.ui-datepicker-group-first'), 'Structure multi [2,2] - first month division');
127125
child = dp.children(':eq(1)');
@@ -156,7 +154,7 @@ test('baseStructure', function() {
156154
inl = init('#inl', {numberOfMonths: 2});
157155
dp = inl.children();
158156
ok(dp.is('.ui-datepicker-inline') && dp.is('.ui-datepicker-multi'), 'Structure inline multi - main div');
159-
equal(dp.children().length, 3 + (iframe ? 1 : 0), 'Structure inline multi - child count');
157+
equal(dp.children().length, 3, 'Structure inline multi - child count');
160158
child = dp.children(':first');
161159
ok(child.is('div.ui-datepicker-group') && child.is('div.ui-datepicker-group-first'), 'Structure inline multi - first month division');
162160
child = dp.children(':eq(1)');
@@ -168,13 +166,12 @@ test('baseStructure', function() {
168166

169167
test('customStructure', function() {
170168
expect( 20 );
171-
var iframe, header, panel, title, thead,
169+
var header, panel, title, thead,
172170
dp = $('#ui-datepicker-div'),
173171
// Check right-to-left localisation
174172
inp = init('#inp', $.datepicker.regional.he);
175173
inp.data('showButtonPanel.datepicker',true);
176174
inp.focus();
177-
iframe = ($.ui.ie6);
178175
ok(dp.is('.ui-datepicker-rtl'), 'Structure RTL - right-to-left');
179176
header = dp.children(':first');
180177
ok(header.is('div.ui-datepicker-header'), 'Structure RTL - header division');

themes/base/jquery.ui.datepicker.css

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,3 @@
5454
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
5555
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
5656
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
57-
58-
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
59-
.ui-datepicker-cover {
60-
position: absolute; /*must have*/
61-
z-index: -1; /*must have*/
62-
filter: mask(); /*must have*/
63-
top: -4px; /*must have*/
64-
left: -4px; /*must have*/
65-
width: 200px; /*must have*/
66-
height: 200px; /*must have*/
67-
}

ui/jquery.ui.datepicker.js

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -682,23 +682,13 @@ $.extend(Datepicker.prototype, {
682682
if (!inst.inline) {
683683
var showAnim = $.datepicker._get(inst, 'showAnim');
684684
var duration = $.datepicker._get(inst, 'duration');
685-
var postProcess = function() {
686-
var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
687-
if( !! cover.length ){
688-
var borders = $.datepicker._getBorders(inst.dpDiv);
689-
cover.css({left: -borders[0], top: -borders[1],
690-
width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
691-
}
692-
};
693685
inst.dpDiv.zIndex($(input).zIndex()+1);
694686
$.datepicker._datepickerShowing = true;
695687

696688
if ( $.effects && $.effects.effect[ showAnim ] )
697-
inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
689+
inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration);
698690
else
699-
inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
700-
if (!showAnim || !duration)
701-
postProcess();
691+
inst.dpDiv[showAnim || 'show'](showAnim ? duration : null);
702692
if (inst.input.is(':visible') && !inst.input.is(':disabled'))
703693
inst.input.focus();
704694
$.datepicker._curInst = inst;
@@ -712,10 +702,6 @@ $.extend(Datepicker.prototype, {
712702
instActive = inst; // for delegate hover events
713703
inst.dpDiv.empty().append(this._generateHTML(inst));
714704
this._attachHandlers(inst);
715-
var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
716-
if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
717-
cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
718-
}
719705
inst.dpDiv.find('.' + this._dayOverClass + ' a').mouseover();
720706
var numMonths = this._getNumberOfMonths(inst);
721707
var cols = numMonths[1];
@@ -1604,8 +1590,7 @@ $.extend(Datepicker.prototype, {
16041590
}
16051591
html += group;
16061592
}
1607-
html += buttonPanel + ($.ui.ie6 && !inst.inline ?
1608-
'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
1593+
html += buttonPanel;
16091594
inst._keyEvent = false;
16101595
return html;
16111596
},

0 commit comments

Comments
 (0)