selector elements now use offsetHeight and offsetWidth instead of
clientHeight and clientWidth of invisible selector element
This commit is contained in:
parent
c549311349
commit
232409d70b
@ -44,8 +44,8 @@ selectorInit: function(id, options, selected, onchange_fct) {
|
|||||||
myspan.id = "styled-select-" + select.id;
|
myspan.id = "styled-select-" + select.id;
|
||||||
myspan.appendChild(textnode);
|
myspan.appendChild(textnode);
|
||||||
select.parentNode.insertBefore(myspan, select);
|
select.parentNode.insertBefore(myspan, select);
|
||||||
myspan.style.width = (select.clientWidth-2)+"px";
|
myspan.style.width = (select.offsetWidth-2)+"px";
|
||||||
myspan.style.height = (select.clientHeight)+"px";
|
myspan.style.height = (select.offsetHeight)+"px"; // clientHeight gives the height of the opened dropbox!
|
||||||
},
|
},
|
||||||
|
|
||||||
// required behaviour of selector on change to switch shown name
|
// required behaviour of selector on change to switch shown name
|
||||||
|
Loading…
Reference in New Issue
Block a user