Repository: tapestry-5 Updated Branches: refs/heads/master 84e414dba -> 553fbe467
TAP5-2504: simplify ElementWrapper.deepVisible, makes it work consistently with Prototype and jQuery Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/553fbe46 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/553fbe46 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/553fbe46 Branch: refs/heads/master Commit: 553fbe46735bc347f5dcd3965dc76fc23bc66a78 Parents: 84e414d Author: Jochen Kemnade <[email protected]> Authored: Wed Sep 16 15:46:23 2015 +0200 Committer: Jochen Kemnade <[email protected]> Committed: Wed Sep 16 15:46:23 2015 +0200 ---------------------------------------------------------------------- .../org/apache/tapestry5/t5-core-dom.coffee | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/553fbe46/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee index 57304b8..e225974 100644 --- a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee +++ b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee @@ -520,15 +520,8 @@ define ["underscore", "./utils", "./events", "jquery"], # Returns true if this element is visible, and all parent elements are also visible, up to the document body. deepVisible: -> - cursor = this - while cursor - return false unless cursor.visible() - cursor = cursor.parent() - - return true if cursor and cursor.element is document.body - - # Bound not reached, meaning that the Element is not currently attached to the DOM. - return false + element = this.element + element.offsetWidth > 0 && element.offsetHeight > 0 # Fires a named event, passing an optional _memo_ object to event handler functions. This must support # common native events (exact list TBD), as well as custom events (in Prototype, custom events must have
