Safari/Chrome: Pulldowns on inline images are now positioned correctly.
This commit is contained in:
parent
f1d814cfd6
commit
a1ffcfb9b8
1
NEWS
1
NEWS
|
@ -3,6 +3,7 @@
|
|||
* You can now create and end links.
|
||||
* Underline and strikethrough now work.
|
||||
* Pulldowns for search suggestions, importing, and exporting show up.
|
||||
* Pulldowns on inline images are now positioned correctly.
|
||||
* Note resizing (growing and shrinking) works as expected.
|
||||
* Improved page loading speed and fixed a rare session locking timeout bug
|
||||
by removing all implicit session locking.
|
||||
|
|
|
@ -2854,10 +2854,15 @@ Pulldown.prototype.finish_init = function () {
|
|||
function calculate_position( node, anchor, relative_to, always_left_align ) {
|
||||
var anchor_dimensions = getElementDimensions( anchor );
|
||||
|
||||
// if the anchor has no height, use its first child (if any) instead
|
||||
if ( anchor_dimensions.h == 0 && anchor.firstChild ) {
|
||||
anchor = anchor.firstChild;
|
||||
anchor_dimensions = getElementDimensions( anchor );
|
||||
// if the anchor's first child is larger (vertically) than its parent, then use it as the anchor
|
||||
if ( anchor.firstChild ) {
|
||||
try{
|
||||
var child_dimensions = getElementDimensions( anchor.firstChild );
|
||||
if ( child_dimensions.h > anchor_dimensions.h ) {
|
||||
anchor = anchor.firstChild;
|
||||
anchor_dimensions = child_dimensions;
|
||||
}
|
||||
} catch ( e ) {}
|
||||
}
|
||||
|
||||
// position the pulldown under the anchor
|
||||
|
|
Reference in New Issue