Resizing oversize window: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(right justify window resized to width of 1024)
(Resizing via JavaScript forbidden/restricted in 7.0.1 and up)
Line 1: Line 1:
'''If you're having trouble resizing an oversized window:'''
'''If you're having trouble resizing an oversized window:''' <br>''(Using JavaSript to resize windows is forbidden in Firefox 7.0.1 and up [http://kb.mozillazine.org/Resizing_oversize_window#JavaScript_no_longer_allowed_to_resize_windows]);''
*Enable [[JavaScript]]. (''Firefox'': [[Menu differences in Windows, Linux, and Mac|Tools -> Options]]  -> Content -> Enable JavaScript; ''Mozilla Suite:'' Edit -> Preferences -> Advanced -> Scripts & Plug-ins -> Enable JavaScript for -> Navigator)
*Enable [[JavaScript]]. (''Firefox'': [[Menu differences in Windows, Linux, and Mac|Tools -> Options]]  -> Content -> Enable JavaScript; ''Mozilla Suite:'' Edit -> Preferences -> Advanced -> Scripts & Plug-ins -> Enable JavaScript for -> Navigator)
*Make sure scripts can resize windows. (''Firefox'': [[Menu differences in Windows, Linux, and Mac|Tools -> Options]]  -> Content -> Advanced JavaScript settings. ''Mozilla Suite:'' Edit -> Preferences -> Advanced -> Scripts & Plug-ins).
*Make sure scripts can resize windows. (''Firefox'': [[Menu differences in Windows, Linux, and Mac|Tools -> Options]]  -> Content -> Advanced JavaScript settings. ''Mozilla Suite:'' Edit -> Preferences -> Advanced -> Scripts & Plug-ins).
Line 8: Line 8:
*On Windows use "Alt+SpaceBar" to move and resize window, especially if the title bar is not accessible because the window is too high.  Move allows you move window.  Size (resize) allows you to resize in a vertical or a horizontal direction but not at the same time.  You can use the mouse or the cursor keys with move or size.
*On Windows use "Alt+SpaceBar" to move and resize window, especially if the title bar is not accessible because the window is too high.  Move allows you move window.  Size (resize) allows you to resize in a vertical or a horizontal direction but not at the same time.  You can use the mouse or the cursor keys with move or size.


'''Combining the two above topics'''
'''Combining the two above topics'''<br>''(Using JavaSript to resize windows is forbidden in Firefox 7.0.1 and up [http://kb.mozillazine.org/Resizing_oversize_window#JavaScript_no_longer_allowed_to_resize_windows]);''
* Create a Bookmarklet with a [http://dmcritchie.mvps.org/firefox/kws.htm keyword] of "'''1024:'''"<br>'''javascript:self.resizeTo(1024,screen.availHeight);self.moveTo(screen.availWidth-1024,0);'''
* Create a Bookmarklet with a [http://dmcritchie.mvps.org/firefox/kws.htm keyword] of "'''1024:'''"   <br>'''javascript:self.resizeTo(1024,screen.availHeight);self.moveTo(screen.availWidth-1024,0);'''
* Invoke the bookmark by typing '''1024:''' into the location bar
* Invoke the bookmark by typing '''1024:''' into the location bar
* The window will fill up the available height with a width  of 1024 pixels, next steps allow you to '''move''' the window left or right by dragging the title bar, you could also resize by dragging borders.  Another way of moving left and right without moving up and down accidentally.
* The window will fill up the available height with a width  of 1024 pixels, next steps allow you to '''move''' the window left or right by dragging the title bar, you could also resize by dragging borders.  Another way of moving left and right without moving up and down accidentally.
Line 32: Line 32:
Resizing with JavaScript has been made almost impossible beginning with Firefox 7.0.1 due to [https://bugzilla.mozilla.org/show_bug.cgi?id=565541 Bug 565541 – Web sites shouldn't be allowed to resize main window], which essentially renders the help provided on this page as useless and leaves users with problems without a simple circumvention to regain control so they can work including to work on fixing problems.
Resizing with JavaScript has been made almost impossible beginning with Firefox 7.0.1 due to [https://bugzilla.mozilla.org/show_bug.cgi?id=565541 Bug 565541 – Web sites shouldn't be allowed to resize main window], which essentially renders the help provided on this page as useless and leaves users with problems without a simple circumvention to regain control so they can work including to work on fixing problems.


Overriding is convoluted because you must make a [http://kb.mozillazine.org/About:config configuration change]  (about:config) to change  '''services.sync.prefs.sync.dom.disable_window_move_resize''' to '''false'''.  You must invoke the JavaScript directly from a bookmark while in "about:config" as the active tab, and you can not invoke the bookmarklet as a keyword shortcut from the location bar.  Whether or not you can bring up "about:config" or not is another obstacle.
Overriding is convoluted because you must make a [http://kb.mozillazine.org/About:config configuration change]  (about:config) to change  '''services.sync.prefs.sync.dom.disable_window_move_resize''' to '''false'''.  You must invoke the JavaScript directly from a bookmark while in "about:config" as the active tab, and you can not invoke the bookmarklet as a keyword shortcut from the location bar.   


===See also===
===See also===

Revision as of 00:46, 3 November 2011

If you're having trouble resizing an oversized window:
(Using JavaSript to resize windows is forbidden in Firefox 7.0.1 and up [1]);

  • Enable JavaScript. (Firefox: Tools -> Options -> Content -> Enable JavaScript; Mozilla Suite: Edit -> Preferences -> Advanced -> Scripts & Plug-ins -> Enable JavaScript for -> Navigator)
  • Make sure scripts can resize windows. (Firefox: Tools -> Options -> Content -> Advanced JavaScript settings. Mozilla Suite: Edit -> Preferences -> Advanced -> Scripts & Plug-ins).
  • Type: javascript:top.resizeTo(screen.width*0.8,screen.height*0.8);self.moveTo(0,0); into the Location Bar and press Enter.

Other methods of resizing windows:

  • Drag the edges of the windows to resize, drag window by title bar to move
  • On Windows use "Alt+SpaceBar" to move and resize window, especially if the title bar is not accessible because the window is too high. Move allows you move window. Size (resize) allows you to resize in a vertical or a horizontal direction but not at the same time. You can use the mouse or the cursor keys with move or size.

Combining the two above topics
(Using JavaSript to resize windows is forbidden in Firefox 7.0.1 and up [2]);

  • Create a Bookmarklet with a keyword of "1024:"
    javascript:self.resizeTo(1024,screen.availHeight);self.moveTo(screen.availWidth-1024,0);
  • Invoke the bookmark by typing 1024: into the location bar
  • The window will fill up the available height with a width of 1024 pixels, next steps allow you to move the window left or right by dragging the title bar, you could also resize by dragging borders. Another way of moving left and right without moving up and down accidentally.
    1. "Alt+SpaceBar" > "M" (Move)
    2. use left and right cursor keys to move left or right, use "Esc" to end

If after following these steps, new windows still start up too big, you may have a corrupt localstore.rdf.

Some causes leading to problems of oversized Windows:

  • Extensions: Babylon Toolbar 1.1.8,  vshare 1.21
  • Zooming and them moving the window.

Causes external to Firefox

With larger screens and monitors and accessibility features the screen resolution or DPI may have been changed for a display screen, and this would affect all applications using a display (screen/monitor).  100% is normal, see if settings have been changed.

Windows 7

Display settings default is 100% but may have been inadvertently set to 125%, 150%, or 200%. See Change your screen resolution. You generally want to go with the recommended settings for your laptop or monitor.

  1. Control Panel (to get to Control Panel\All Control Panel Items\Display\ )
  2. Screen Resolution -- see link "Make text and other items larger or smaller")
  3. Display -- "Smaller 100% (default)" (custom DPI sizes on the left panel allow other sizes than shown)

JavaScript no longer allowed to resize windows

Resizing with JavaScript has been made almost impossible beginning with Firefox 7.0.1 due to Bug 565541 – Web sites shouldn't be allowed to resize main window, which essentially renders the help provided on this page as useless and leaves users with problems without a simple circumvention to regain control so they can work including to work on fixing problems.

Overriding is convoluted because you must make a configuration change (about:config) to change services.sync.prefs.sync.dom.disable_window_move_resize to false. You must invoke the JavaScript directly from a bookmark while in "about:config" as the active tab, and you can not invoke the bookmarklet as a keyword shortcut from the location bar.

See also