Forum Discussion

Ben1's avatar
Ben1
Occasional Visitor
9 years ago

VisibleOnScreen different behavior for Firefox&IE vs. Chrome

Hi,

 

I run into trouble using the property VisibleOnScreen for a cell in a table. Different browsers reported different booleans...even if the website is rendered identicial.

 

12 Cells should be visible;

Firefox and IE are reporting the property VisibleOnScreen of table.Cell(12,0) is false (using method checkProperty/getPropertyValue & debug local watch element).

Chrome is reporting the property VisibleOnScreen of table.Cell(12,0) is false (debug local watch element) and true (if using method checkProperty/getPropertyValue).

 

So Firefox and IE are correct and consistent.

 

 

Chrome (or your plugin) is behaving really strange. If I to something like this "var test = table.Cell(12,0)" and do a breakpoint there, I will find in the watcher-view that the VisibleOnScreen property is false (as it should). If I do in the next line "var test1 = aqObject.getPropertyValue(table.Cell(12,0), "VisibleOnScreen)" I will get true...which is wrong.

And it is not changing in this moment (because if I do "var test1 = table.Cell(12,0)" after both lines, it is still false).

 

For cell 13 all browers report false.

The parent element of cell 12 has a height of 215 and cell 12 has an offset of 215. So we are discussing one pixel and I guess your implementation for the different browsers are desciding differently in this case.

 

I understand that (still an error in my point of view), but what I do not understand is the different property value depending how you access the property...

 

Hope you can help me, best regards

Ben

1 Reply

  • I had a similar issue where depending on Browser, the CheckProperty wouldn't do a "proper" compare of boleans...

    meaning, the object browser and variable value were both reporting the correct value, and even CheckProperty reported the proper value but turned it false as a result with cmpEquals....

     

    This was often the case as well with RadioButtons and CheckBoxes with the property wChecked...

     

    Using an IF condition instead reported the proper result, so I had to drop using CheckProperty in some cases.