Results 1 to 4 of 4

This is a discussion on Focus address bar or content within the Plugins Development section, part of the Chrome Plugins category: Hello, is it possible from the extension to focus / select all text in address bar? Is it possible to ...


  1. #1
    a2720286 is offline Junior Member
    Join Date
    Apr 2010
    Posts
    2

    Default Focus address bar or content

    Hello, is it possible from the extension to focus / select all text in address bar? Is it possible to empty address bar? Is it possible to focus webpage content instead? Please help! Thanks in advance!

  2. #2
    Waha's Avatar
    Waha is offline Senior Member
    Join Date
    Apr 2009
    Location
    Oregon
    Posts
    788

    Default

    You can focus stuff in a webpage, but you can't interact with the OmniBar from JavaScript.
    As far as I know, most elements can be focused using element.focus();
    ~ Projects ~
    Specialized: Carapass Auction Watcher, Kongregate Chat
    Libraries: bliplib
    Tools: manifest syntax highlighting & snippits
    ~ Happy to make extensions for pay too ;D ~
    Portfolio: Search and Share

  3. #3
    a2720286 is offline Junior Member
    Join Date
    Apr 2010
    Posts
    2

    Default

    ok i see what you mean, pity it's not doable..

    i don't know exact element on the page.. i would just like to focus content control (like on mozilla where i would simply do content.focus())

  4. #4
    Waha's Avatar
    Waha is offline Senior Member
    Join Date
    Apr 2009
    Location
    Oregon
    Posts
    788

    Default

    Content control? You could loop through form elements or soemthing..or like document.getElementsByTagName("input"); or whatever..not sure exactly what you're needing.
    ~ Projects ~
    Specialized: Carapass Auction Watcher, Kongregate Chat
    Libraries: bliplib
    Tools: manifest syntax highlighting & snippits
    ~ Happy to make extensions for pay too ;D ~
    Portfolio: Search and Share

Similar Threads

  1. How to debug content script?
    By alex82 in forum Plugins Development
    Replies: 5
    Last Post: 09-02-2010, 12:45 PM
  2. content script help
    By crackruckles in forum Plugins Development
    Replies: 7
    Last Post: 02-19-2010, 03:31 AM
  3. insecure content
    By mpfizer in forum Chrome Central
    Replies: 4
    Last Post: 01-30-2010, 03:11 AM
  4. Content Script Issues
    By hexid in forum Plugins Development
    Replies: 2
    Last Post: 12-15-2009, 02:37 PM
  5. Shift focus from webpage to Chrome
    By BordrGuy108 in forum Chrome Tips & Tricks
    Replies: 1
    Last Post: 11-29-2009, 06:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •