penguin/AstroJS

Javascript framework for my blog

commit c328231f76ce7b1f659c0ac121ab042dd45619ce

author斟酌 鵬兄 <tgckpg@gmail.com>
date2015-09-27T23:40:34Z
subjectwrong referencing target
commit c328231f76ce7b1f659c0ac121ab042dd45619ce
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2015-09-27T23:40:34Z

    wrong referencing target
---
 botanjs/src/Components/MessageBox.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/botanjs/src/Components/MessageBox.js b/botanjs/src/Components/MessageBox.js
index 400db89..1600e2a 100644
--- a/botanjs/src/Components/MessageBox.js
+++ b/botanjs/src/Components/MessageBox.js
@@ -115,7 +115,7 @@
 				m_style.marginTop = ( -0.5 * mHeight ) + "px";
 
 				m_style.opacity = 1;
-				if( mHeight < ( bBox.getBoundingClientRect().y - bBox.parentNode.getBoundingClientRect().y + bBoxHeight ) )
+				if( mHeight < ( bBox.getBoundingClientRect().y - bBox.previousSibling.getBoundingClientRect().y + bBoxHeight ) )
 				{
 					m_style.height = "100%";
 					this.innerBox.style.maxHeight = ( innerHeight - bBoxHeight ) + "px"