[Vimperator] can scroll bar be hiden?
Tim Hammerquist
penryu at gmail.com
Thu Jun 5 13:53:43 PDT 2008
cch wrote:
> Sender: vimperator-bounces at mozdev.org
> From: cch <chencanhua at fudan.edu.cn>
> Subject: [Vimperator] can scroll bar be hiden?
> Date: Wed, 04 Jun 2008 09:48:54 +0800
> To: vimperator <vimperator at mozdev.org>
> Mail-followup-to: vimperator <vimperator at mozdev.org>
> Reply-To: vimperator at mozdev.org
> X-Original-To: vimperator at mozdev.org
> User-Agent: Mutt/1.5.13 (2006-08-11)
>
> I am just becoming familiar with vimperator.
> can the usually scroll bar be hiden,
> like menu and toolbar?
> Cool if it could be.
At this stage in Firefox evolution, this just may be a moot point,
despite how much I'd love this feature.
I've looked into this for some time and my findings are roughly thus:
- Firefox scrollbars can be removed by changing the overflow,
overflow-x, and overflow-y css properties of the content body
(overflow, overflowX, overflowY properties of the
content.body.style javascript object, respectively).
- Doing this convinces firefox that the document is thereafter NOT
SCROLLABLE except by explicit calls to that effect. firefox will
not scroll the page in response to mousewheel events, or
<C-f>/Find/Find Again actions, which also breaks searching with
/ and ?.
- The mousewheel can be (mostly) worked around by feeding the
event.detail value from the DOMMouseScroll event directly to the
content window's scrollByLines() method. However, this event does
not seem to distinguish between horizontal or vertical scroll
events.
- This still leaves Firefox's fastFind functionality broken.
fastFind/Vimperator will continue to find and highlight matches
throughout the page, but will not scroll the page to reveal them
in either full search or incremental searching.
NB: The CSS hack of marking the scrollbar element "visibility:
collapsed" does not seem to work in recent FF3 builds; it may have
stopped working when xulscrollbars.css and nativescrollbars.css were
unified.
These findings seem to match what others have found as well.
As the fastFind find() and findAgain() methods are native code, I'm
unaware of any method to override Firefox's refusal to autoscroll a
window sans scrollbars without completely reimplementing find
functionality from scratch in javascript -- an adventure sure to be
frought with peril, bugs, performance issues and which will surely not
be undertaken by me.
As hiding scrollbars at the expense of broken searching is too high a
price for me (and likely most vimperator users), this is feature is
probably tabled pending new information.
I have attached a patch showing my progress. Perhaps this will benefit
others with more knowledge of chrome issues or firefox internals.
HTH,
Tim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hide_scrollbar.patch
Type: text/x-diff
Size: 7775 bytes
Desc: not available
Url : http://www.mozdev.org/pipermail/vimperator/attachments/20080605/f581e1df/attachment.bin
More information about the Vimperator
mailing list