commit 68f3da2c10aef7a8510abef4e0dded2015604b97 parent 2a102577d1c606d03862b4137fe3da77dc52fc9c Author: Dan Stillman <dstillman@zotero.org> Date: Tue, 10 Jan 2012 19:51:01 -0500 Scroll row into view when tabbing through item/tags box Using a hack (focusing the proceeding row) for now. Not sure what's causing this. Diffstat:
| M | chrome/content/zotero/bindings/itembox.xml | | | 14 | +++++++++++++- |
| M | chrome/content/zotero/bindings/tagsbox.xml | | | 14 | +++++++++++++- |
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml @@ -2345,7 +2345,19 @@ } next[0].click(); - this.ensureElementIsVisible(next[0]); + + // DEBUG: next[0] is always equal to the target element, + // but for some reason it's necessary to scroll to the next + // element when moving forward for the target element to + // be fully in view + if (!back && next[0].parentNode.nextSibling) { + var visElem = next[0].parentNode.nextSibling; + } + else { + var visElem = next[0]; + } + this.ensureElementIsVisible(visElem); + return true; ]]> </body> diff --git a/chrome/content/zotero/bindings/tagsbox.xml b/chrome/content/zotero/bindings/tagsbox.xml @@ -652,7 +652,19 @@ } next[0].click(); - this.ensureElementIsVisible(next[0]); + + // DEBUG: next[0] is always equal to the target element, + // but for some reason it's necessary to scroll to the next + // element when moving forward for the target element to + // be fully in view + if (!back && next[0].parentNode.nextSibling) { + var visElem = next[0].parentNode.nextSibling; + } + else { + var visElem = next[0]; + } + this.ensureElementIsVisible(visElem); + return true; ]]> </body>