diff --git a/NEWS b/NEWS index da8598c..1bc736f 100644 --- a/NEWS +++ b/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 diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 3578090..20eeca1 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -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 ) {