Pulldowns for search suggestions, importing, and exporting now show up. Worked around yet another WebKit bug/misfeature.
This commit is contained in:
parent
5944d1f20d
commit
abd5a2a189
2
NEWS
2
NEWS
|
@ -2,7 +2,7 @@
|
|||
* Safari and Chrome web browsers are now supported (beta):
|
||||
* You can now create and end links.
|
||||
* Underline and strikethrough now work.
|
||||
*
|
||||
* Pulldowns for search suggestions, importing, and exporting show up.
|
||||
|
||||
1.5.2: October 1, 2008
|
||||
* Leading/trailing spaces in note titles are now ignored when making links
|
||||
|
|
|
@ -2855,6 +2855,20 @@ function calculate_position( node, anchor, relative_to, always_left_align ) {
|
|||
// position the pulldown under the anchor
|
||||
var position = getElementPosition( anchor );
|
||||
|
||||
// in WebKit, work around a bug in which children/grandchildren/etc of relatively positioned
|
||||
// elements have an incorrect position
|
||||
if ( WEBKIT ) {
|
||||
var parent_node = anchor.parentNode;
|
||||
while ( parent_node ) {
|
||||
if ( getStyle( parent_node, "position" ) == "relative" ) {
|
||||
position.x -= parent_node.offsetLeft;
|
||||
position.y -= parent_node.offsetTop;
|
||||
break;
|
||||
}
|
||||
parent_node = parent_node.parentNode;
|
||||
}
|
||||
}
|
||||
|
||||
if ( relative_to ) {
|
||||
var relative_pos = getElementPosition( relative_to );
|
||||
if ( relative_pos ) {
|
||||
|
|
Reference in New Issue
Block a user