Skip to content
Snippets Groups Projects
Commit a0b7a0ef authored by Andreas Gohr's avatar Andreas Gohr
Browse files

hide pickers with margin-left - fixes FS#1781

Ignore-this: 51cdec6032a57653543cc2f73f92fa74

darcs-hash:20091018135147-7ad00-7c58d9343250d2d331b820497df6807a71e9b5ef.gz
parent 51c37979
No related branches found
No related tags found
No related merge requests found
......@@ -65,9 +65,9 @@ function createPicker(id,props,edid){
if(props['class']){
picker.className += ' '+props['class'];
}
picker.id = id;
picker.style.position = 'absolute';
picker.style.left = '-10000px'; // no display none, to keep access keys working
picker.id = id;
picker.style.position = 'absolute';
picker.style.marginLeft = '-10000px'; // no display none, to keep access keys working
for(var key in list){
if (!list.hasOwnProperty(key)) continue;
......
......@@ -28,7 +28,7 @@ var linkwiz = {
linkwiz.wiz.className = 'picker';
linkwiz.wiz.style.top = (findPosY(textArea)+20)+'px';
linkwiz.wiz.style.left = (findPosX(textArea)+80)+'px';
linkwiz.wiz.style.display = 'none';
linkwiz.wiz.style.marginLeft = '-10000px';
linkwiz.wiz.innerHTML =
'<div id="link__wiz_header">'+
......@@ -244,7 +244,7 @@ var linkwiz = {
* Show the linkwizard
*/
show: function(){
linkwiz.wiz.style['display'] = '';
linkwiz.wiz.style.marginLeft = '0px';
linkwiz.entry.focus();
linkwiz.autocomplete();
},
......@@ -253,7 +253,7 @@ var linkwiz = {
* Hide the link wizard
*/
hide: function(){
linkwiz.wiz.style['display'] = 'none';
linkwiz.wiz.style.marginLeft = '-10000px';
linkwiz.textArea.focus();
},
......@@ -261,7 +261,7 @@ var linkwiz = {
* Toggle the link wizard
*/
toggle: function(){
if(linkwiz.wiz.style['display'] == 'none'){
if(linkwiz.wiz.style.marginLeft == '-10000px'){
linkwiz.show();
}else{
linkwiz.hide();
......
......@@ -183,13 +183,14 @@ function addBtnActionLinkwiz(btn, props, edid) {
*/
function pickerToggle(pickerid,btn){
var picker = $(pickerid);
if(picker.style.left == '-10000px'){
if(picker.style.marginLeft == '-10000px'){
var x = findPosX(btn);
var y = findPosY(btn);
picker.style.left = (x+3)+'px';
picker.style.top = (y+btn.offsetHeight+3)+'px';
picker.style.marginLeft = '0px';
}else{
picker.style.left = '-10000px';
picker.style.marginLeft = '-10000px';
}
}
......@@ -201,7 +202,7 @@ function pickerToggle(pickerid,btn){
function pickerClose(){
var pobjs = getElementsByClass('picker');
for(var i=0; i<pobjs.length; i++){
pobjs[i].style.left = '-10000px';
pobjs[i].style.marginLeft = '-10000px';
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment