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.
|
* You can now create and end links.
|
||||||
* Underline and strikethrough now work.
|
* Underline and strikethrough now work.
|
||||||
* Pulldowns for search suggestions, importing, and exporting show up.
|
* 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.
|
* Note resizing (growing and shrinking) works as expected.
|
||||||
* Improved page loading speed and fixed a rare session locking timeout bug
|
* Improved page loading speed and fixed a rare session locking timeout bug
|
||||||
by removing all implicit session locking.
|
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 ) {
|
function calculate_position( node, anchor, relative_to, always_left_align ) {
|
||||||
var anchor_dimensions = getElementDimensions( anchor );
|
var anchor_dimensions = getElementDimensions( anchor );
|
||||||
|
|
||||||
// if the anchor has no height, use its first child (if any) instead
|
// if the anchor's first child is larger (vertically) than its parent, then use it as the anchor
|
||||||
if ( anchor_dimensions.h == 0 && anchor.firstChild ) {
|
if ( anchor.firstChild ) {
|
||||||
anchor = anchor.firstChild;
|
try{
|
||||||
anchor_dimensions = getElementDimensions( anchor );
|
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
|
// position the pulldown under the anchor
|
||||||
|
|
Reference in New Issue