Resizing oversize window: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(Fix headings structure and Contents table)
Line 1: Line 1:
'''If you're having trouble resizing an oversized window:''' <br>''(Using JavaScript 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]);''
The article is about resizing or moving a window.&nbsp; This may be done externally to Firefox or through Firefox. A window may have been resized accidentally or by a misbehaving extension.   One of the quickest means for exact specifications had been by using a bookmarkletYou can no longer use a bookmarklet in Firefox  to resize or move a window, though you can now paste the code into the Web Console.   Other browsers still allow you to use bookmarklets to resize.   If you don't need precise specified sizes and alignments you can continue to use the facilities of your operating system.
*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).
*Type:  '''javascript:top.resizeTo(screen.width*0.8,screen.height*0.8);self.moveTo(0,0);''' into the [[:Category:Location Bar | Location Bar]] and press Enter.


'''Other methods of resizing windows:'''
==Some methods of resizing windows==
*"F11" toggles in/out of Full Screen mode, make sure you are not in Full Screen mode in order to resize a window
*"F11" toggles in/out of Full Screen mode, make sure you are not in Full Screen mode when trying to resize a window
*Drag the edges of the window to resize, drag window by title bar to move
*Drag the edges of the window to resize.
*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.&nbsp; Use "Enter" to release the grasp after dragging window or edges.
*Drag window by title bar to move.  Firefox 29 dropped title bar, the option to restore is found at the bottom of the Toolbar customization dialog.
*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.  Use "Enter" to release the grasp after dragging window or edges.
*(Windows 7) use WinKey+''right-cursor-key''  to move Window to right side of screen -- works across multiple monitors, and window can be resized afterwards by moving edges of the window.  May also be used if Window gets lost on a monitor no longer connected -- use shortcut until  window appears in position on current screen.
*(Windows 7) use WinKey+''right-cursor-key''  to move Window to right side of screen -- works across multiple monitors, and window can be resized afterwards by moving edges of the window.  May also be used if Window gets lost on a monitor no longer connected -- use shortcut until  window appears in position on current screen.
*On Mac:  see "[http://www.macyourself.com/2009/04/16/how-to-resize-a-window-on-your-macs-screen-thats-too-big-to-drag/ How to resize a window on your Mac’s screen that’s too big to drag]" (MacYourself)
*(Windows)  "Alt+SpaceBar" > "M"  (Move)
*(Windows)  use left and right cursor keys to move window left or right, use "Esc" to end
*(Mac:) see "[http://www.macyourself.com/2009/04/16/how-to-resize-a-window-on-your-macs-screen-thats-too-big-to-drag/ How to resize a window on your Mac’s screen that’s too big to drag]" (MacYourself)


'''Combining the two above topics'''<br>''(Using JavaScript to resize windows is forbidden in Firefox 7.0.1 and up [#JavaScript_no_longer_allowed_to_resize_windows]);''
If after following these steps to resize windows, new Firefox windows still start up too big, you may have a [[corrupt localstore.rdf]].
* 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
* 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.
*# (Windows)  "Alt+SpaceBar" > "M"  (Move)
*# (Windows)  use left and right cursor keys to move window 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 of oversize windows==
===Causes within Firefox or Firefox extensions===


'''Some causes leading to problems of oversized Windows:'''
'''Some causes leading to problems of oversized Windows:'''
*Extensions: ''''''Babylon Toolbar'''''' 1.1.8,&nbsp; ''''''vshare'''''' 1.21
*Extensions: ''''''Babylon Toolbar'''''' 1.1.8,  ''''''vshare'''''' 1.21
*Zooming and then moving the window.  
*Zooming and then moving the window.  
*  Switching display between monitors
*  Switching display between monitors
Line 27: Line 23:


===Causes external to Firefox===
===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).&nbsp; 100% is normal, see if settings have been changed.
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====
====Windows 7====
Display settings '''default is 100%''' but may have been inadvertently set to 125%, 150%, or 200%.  See [http://windows.microsoft.com/en-US/windows7/Change-your-screen-resolution Change your screen resolution].  You generally want to go with the recommended settings for your laptop or monitor.
Display settings '''default is 100%''' but may have been inadvertently set to 125%, 150%, or 200%.  See [http://windows.microsoft.com/en-US/windows7/Change-your-screen-resolution Change your screen resolution].  You generally want to go with the recommended settings for your laptop or monitor.
Line 34: Line 30:
# Display  --  "Smaller '''100%''' (default)"  (custom DPI sizes on the left panel allow other sizes than shown)
# Display  --  "Smaller '''100%''' (default)"  (custom DPI sizes on the left panel allow other sizes than shown)


====JavaScript no longer allowed to resize windows  through the Location Bar====
==JavaScript no longer allowed to resize windows  through the Location Bar==
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 on fixing problems. [https://support.mozilla.org/en-US/questions/880032]
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 on fixing problems. [https://support.mozilla.org/en-US/questions/880032]


Resizing with JavaScript code is now possible but very convoluted because you must now submit the content of your bookmarklet through the Web Console (Firefox 19).  Relegating your resize bookmarks to cataloging system  that you cannot invoke directly.   
Resizing with the JavaScript code is possible but very convoluted because you must now submit the content of your bookmarklet through the Web Console (Firefox 19).  Relegating your resize bookmarks to cataloging system (bookmarks) that you cannot invoke directly.   


'''New Steps needed to invoke a simple resize window keyword shortcut''' that you could
'''New Steps needed to invoke a simple resize window keyword shortcut''' that you could
Line 48: Line 44:
#  Paste ("Ctrl+V") into the Command area at the bottom of the Web Console and press "Enter".
#  Paste ("Ctrl+V") into the Command area at the bottom of the Web Console and press "Enter".


'''Examples to Resize or Move windows: (See above steps to invoke these bookmarklets)'''
'''Examples to Resize or Move windows: (See above steps to invoke the code within these bookmarklets)'''


*"'''1024:'''  &nbsp; Resize to a width of 1024"<br><code>javascript:self.resizeTo(1024,screen.availHeight);self.moveTo(screen.availWidth-1024,0);</code>
*"'''1024:'''    Resize to a width of 1024"<br><code>javascript:self.resizeTo(1024,screen.availHeight);self.moveTo(screen.availWidth-1024,0);</code>
*"'''512:L'''  &nbsp; Resize and move to left side of screen as if 1/2 of 1024"<br><code>javascript:self.resizeTo(512,screen.availHeight);self.moveTo(-1,0);</code>
*"'''512:L'''    Resize and move to left side of screen as if 1/2 of 1024"<br><code>javascript:self.resizeTo(512,screen.availHeight);self.moveTo(-1,0);</code>
*"'''512:R'''"  <br><code>javascript:self.resizeTo(512,screen.availHeight);self.moveTo(845,0);</code>
*"'''512:R'''"  <br><code>javascript:self.resizeTo(512,screen.availHeight);self.moveTo(845,0);</code>
*"'''center:bottom'''"<br><code>javascript:self.moveTo((screen.width-window.outerWidth)/2,screen.availHeight-window.outerHeight)</code>
*"'''center:bottom'''"<br><code>javascript:self.moveTo((screen.width-window.outerWidth)/2,screen.availHeight-window.outerHeight)</code>
Line 57: Line 53:
*"'''center:max'''"<br><code>javascript:self.resizeTo(window.outerWidth,screen.availHeight);self.moveTo((screen.width-window.outerWidth)/2,0)</code>
*"'''center:max'''"<br><code>javascript:self.resizeTo(window.outerWidth,screen.availHeight);self.moveTo((screen.width-window.outerWidth)/2,0)</code>
*"'''center:top'''"<br><code>javascript:self.moveTo((screen.width-window.outerWidth)/2,0)</code>
*"'''center:top'''"<br><code>javascript:self.moveTo((screen.width-window.outerWidth)/2,0)</code>
*"'''iPOD:'''  &nbsp; simulate iPOD on larger screen" <br><code>javascript:self.resizeTo(800,480);self.moveTo(0,0);</code>
*"'''iPOD:'''    simulate iPOD on larger screen" <br><code>javascript:self.resizeTo(800,480);self.moveTo(0,0);</code>
*"'''max:height'''"<br><code>javascript:self.resizeTo(window.outerWidth,screen.availHeight);self.moveTo(window.screenX,0);</code>
*"'''max:height'''"<br><code>javascript:self.resizeTo(window.outerWidth,screen.availHeight);self.moveTo(window.screenX,0);</code>
*"'''max:width'''"<br><code>javascript:self.resizeTo(screen.availWidth,window.outerHeight);self.moveTo(0,window.screenY);</code>
*"'''max:width'''"<br><code>javascript:self.resizeTo(screen.availWidth,window.outerHeight);self.moveTo(0,window.screenY);</code>
*"'''netbook:'''  &nbsp; Simulate 800x400 resolution on a larger screen" -- see http://kb.mozillazine.org/Netbooks"<br><code>javascript:self.resizeTo(800,480);self.moveTo(0,0);</code>
*"'''netbook:'''    Simulate 800x400 resolution on a larger screen" -- see http://kb.mozillazine.org/Netbooks"<br><code>javascript:self.resizeTo(800,480);self.moveTo(0,0);</code>
*"'''resize:''' &nbsp; to specified window width and available height"<br><code>javascript:self.resizeTo(%S,screen.availHeight);self.moveTo((screen.availWidth-%S)/2+1,0)</code>
*"'''resize:'''   to specified window width and available height"<br><code>javascript:self.resizeTo(%S,screen.availHeight);self.moveTo((screen.availWidth-%S)/2+1,0)</code>
*"'''resize:L''' &nbsp; simulate WinKey+left-cursor-key"<br><code>javascript:self.resizeTo(screen.availWidth/2,screen.availHeight);self.moveTo(0,0);</code>
*"'''resize:L'''   simulate WinKey+left-cursor-key"<br><code>javascript:self.resizeTo(screen.availWidth/2,screen.availHeight);self.moveTo(0,0);</code>
*"'''resize:R'''" &nbsp; <br><code>javascript:self.resizeTo(screen.availWidth/2,screen.availHeight);self.moveTo(screen.availWidth/2+1,0);</code>
*"'''resize:R'''"   <br><code>javascript:self.resizeTo(screen.availWidth/2,screen.availHeight);self.moveTo(screen.availWidth/2+1,0);</code>
*"'''resize:reduce'''" <br><code>javascript:top.resizeTo(screen.width*0.8,screen.height*0.8);self.moveTo(0,0);</code>
*"'''resize:reduce'''" <br><code>javascript:top.resizeTo(screen.width*0.8,screen.height*0.8);self.moveTo(0,0);</code>


Line 69: Line 65:
See this [https://support.mozilla.com/questions/897372 posted comment] for additional details and comments.
See this [https://support.mozilla.com/questions/897372 posted comment] for additional details and comments.


===See also===
==See also==
*[[Zoom text of web pages]]
*[[Zoom text of web pages]]




[[Category:Issues (Firefox)]] [[Category:Issues (Mozilla Suite)]]
[[Category:Issues (Firefox)]] [[Category:Issues (Mozilla Suite)]]

Revision as of 02:51, 15 May 2014

The article is about resizing or moving a window.  This may be done externally to Firefox or through Firefox. A window may have been resized accidentally or by a misbehaving extension.  One of the quickest means for exact specifications had been by using a bookmarklet. You can no longer use a bookmarklet in Firefox to resize or move a window, though you can now paste the code into the Web Console. Other browsers still allow you to use bookmarklets to resize. If you don't need precise specified sizes and alignments you can continue to use the facilities of your operating system.

Some methods of resizing windows

  • "F11" toggles in/out of Full Screen mode, make sure you are not in Full Screen mode when trying to resize a window
  • Drag the edges of the window to resize.
  • Drag window by title bar to move. Firefox 29 dropped title bar, the option to restore is found at the bottom of the Toolbar customization dialog.
  • 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.  Use "Enter" to release the grasp after dragging window or edges.
  • (Windows 7) use WinKey+right-cursor-key to move Window to right side of screen -- works across multiple monitors, and window can be resized afterwards by moving edges of the window. May also be used if Window gets lost on a monitor no longer connected -- use shortcut until window appears in position on current screen.
  • (Windows) "Alt+SpaceBar" > "M" (Move)
  • (Windows) use left and right cursor keys to move window left or right, use "Esc" to end
  • (Mac:) see "How to resize a window on your Mac’s screen that’s too big to drag" (MacYourself)

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

Some causes of oversize windows

Causes within Firefox or Firefox extensions

Some causes leading to problems of oversized Windows:

  • Extensions: 'Babylon Toolbar' 1.1.8,  'vshare' 1.21
  • Zooming and then moving the window.
  • Switching display between monitors
  • Dragging window between monitors

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 through the Location Bar

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 on fixing problems. [1]

Resizing with the JavaScript code is possible but very convoluted because you must now submit the content of your bookmarklet through the Web Console (Firefox 19). Relegating your resize bookmarks to cataloging system (bookmarks) that you cannot invoke directly.

New Steps needed to invoke a simple resize window keyword shortcut that you could once simply do from the Location Bar. (These are the steps in Firefox 29).

  1. Bring up the Bookmarks sidebar ("Ctrl+B"),
  2. Find your bookmarklet with the search at the top of the sidebar. The keyword itself is not searchable, but if you include your keyword anywhere in the title that would work and it is recommended that you keep your keyworded shortcut bookmarks together and actually place the keyword at the beginning of the bookmark title.
  3. Bring up properties for you chosen bookmarklet.
  4. Copy the bookmarklet code ("Ctrl+C")
  5. Bring up Tools > Web Developer > Web Console ("Ctrl+Shift+K")
  6. Paste ("Ctrl+V") into the Command area at the bottom of the Web Console and press "Enter".

Examples to Resize or Move windows: (See above steps to invoke the code within these bookmarklets)

  • "1024:   Resize to a width of 1024"
    javascript:self.resizeTo(1024,screen.availHeight);self.moveTo(screen.availWidth-1024,0);
  • "512:L   Resize and move to left side of screen as if 1/2 of 1024"
    javascript:self.resizeTo(512,screen.availHeight);self.moveTo(-1,0);
  • "512:R"
    javascript:self.resizeTo(512,screen.availHeight);self.moveTo(845,0);
  • "center:bottom"
    javascript:self.moveTo((screen.width-window.outerWidth)/2,screen.availHeight-window.outerHeight)
  • "center:center"
    javascript:self.moveTo((screen.availWidth-window.outerWidth)/2,(screen.availHeight-window.outerHeight)/2)
  • "center:max"
    javascript:self.resizeTo(window.outerWidth,screen.availHeight);self.moveTo((screen.width-window.outerWidth)/2,0)
  • "center:top"
    javascript:self.moveTo((screen.width-window.outerWidth)/2,0)
  • "iPOD:   simulate iPOD on larger screen"
    javascript:self.resizeTo(800,480);self.moveTo(0,0);
  • "max:height"
    javascript:self.resizeTo(window.outerWidth,screen.availHeight);self.moveTo(window.screenX,0);
  • "max:width"
    javascript:self.resizeTo(screen.availWidth,window.outerHeight);self.moveTo(0,window.screenY);
  • "netbook:   Simulate 800x400 resolution on a larger screen" -- see http://kb.mozillazine.org/Netbooks"
    javascript:self.resizeTo(800,480);self.moveTo(0,0);
  • "resize:   to specified window width and available height"
    javascript:self.resizeTo(%S,screen.availHeight);self.moveTo((screen.availWidth-%S)/2+1,0)
  • "resize:L   simulate WinKey+left-cursor-key"
    javascript:self.resizeTo(screen.availWidth/2,screen.availHeight);self.moveTo(0,0);
  • "resize:R"  
    javascript:self.resizeTo(screen.availWidth/2,screen.availHeight);self.moveTo(screen.availWidth/2+1,0);
  • "resize:reduce"
    javascript:top.resizeTo(screen.width*0.8,screen.height*0.8);self.moveTo(0,0);

Additional Resize/Move keyword shortcuts can be found in the "Resize" folder within k.html, use the "href:" keyword shortcut per directions to see the urls and bookmarklet coding. More information about Keyword Shortcuts. See this posted comment for additional details and comments.

See also