Hi,
If i use a dropdownlist in overflowTemplate, then the anchor is always visible:
The problem is that the dropdown creates its popup in the popup of the anchor, so the _toggleOverflowAnchor private function finds an element which is not OVERFLOW_HIDDEN (line nr 2):
Regards,
Laszlo Jakab
If i use a dropdownlist in overflowTemplate, then the anchor is always visible:
<!DOCTYPE html>
<
html
>
<
head
>
<
meta
charset
=
"utf-8"
>
<
title
>Kendo UI Snippet</
title
>
<
link
rel
=
"stylesheet"
href
=
"http://cdn.kendostatic.com/2014.2.716/styles/kendo.common.min.css"
>
<
link
rel
=
"stylesheet"
href
=
"http://cdn.kendostatic.com/2014.2.716/styles/kendo.rtl.min.css"
>
<
link
rel
=
"stylesheet"
href
=
"http://cdn.kendostatic.com/2014.2.716/styles/kendo.default.min.css"
>
<
link
rel
=
"stylesheet"
href
=
"http://cdn.kendostatic.com/2014.2.716/styles/kendo.dataviz.min.css"
>
<
link
rel
=
"stylesheet"
href
=
"http://cdn.kendostatic.com/2014.2.716/styles/kendo.dataviz.default.min.css"
>
<
link
rel
=
"stylesheet"
href
=
"http://cdn.kendostatic.com/2014.2.716/styles/kendo.mobile.all.min.css"
>
<
script
src
=
"http://code.jquery.com/jquery-1.9.1.min.js"
></
script
>
<
script
src
=
"http://cdn.kendostatic.com/2014.2.716/js/kendo.all.min.js"
></
script
>
</
head
>
<
body
>
<
div
id
=
"toolbar"
></
div
>
<
script
>
$("#toolbar").kendoToolBar({
items: [
{ type: "button", text: "Button" },
{ type: "button", text: "Button" },
{ type: "button", text: "Button" },
{ type: "button", text: "Button" },
{ template: '<
div
>1234567891</
div
>', overflowTemplate: '<
div
><
select
id
=
"sel"
></
select
></
div
>' }
]
});
$('#sel').kendoDropDownList({
dataSource: ['a', 'b', 'c']
});
</
script
>
</
body
>
</
html
>
The problem is that the dropdown creates its popup in the popup of the anchor, so the _toggleOverflowAnchor private function finds an element which is not OVERFLOW_HIDDEN (line nr 2):
01.
_toggleOverflowAnchor:
function
() {
02.
if
(
this
.popup.element.children(
":not(."
+ OVERFLOW_HIDDEN +
")"
).length > 0) {
03.
this
.overflowAnchor.css({
04.
visibility:
"visible"
,
05.
width:
""
06.
});
07.
}
else
{
08.
this
.overflowAnchor.css({
09.
visibility:
"hidden"
,
10.
width:
"1px"
11.
});
12.
}
13.
},
Regards,
Laszlo Jakab