Bootstrap Popover/Tooltip Click Trigger


  1. Narration
  2. Breakdown
  3. Demo


Web development has it’s quirks. And by I mean that those of us like myself who are used to the simple and safe territory of a well defined, well documented, and most of all  consistent server-side programming language usually end up somewhere between daunted and devastated each time we subject ourselves to the tempestuous whims of front-end development. Like a peaceful Vault-dweller, each time I poke my head into the Capital Wasteland of browser-compatibility I either retreat in fear, or venture forth to discover that these badlands are just as much of a deathtrap as I believed them to be.

Unfortunately, my job requires on a daily basis for me to venture out into this dangerous wilderness and test my mettle (and much more so my patience) by working with that special trifecta of HTML, CSS, and Javascript. I also have a terrible memory, so I run into the same problems and reinvestigate them far more often than I should. So I’m making a start to writing down those problems, both for my reference and yours.

Let me begin by saying that I have a confession to make. I use Bootstrap. And I love it. I rely on it. It makes a lot of this terrible business a lot more bearable. When it goes wrong it makes me sad. Not just because I then actually have to do my own work, but because it’s like my close friend has suddenly grown a second, angrier head and has started hurling insults and rocks my way. In short, I feel betrayed.

Most recently this happened with the Twitter Bootstrap popover extension. Normally a lovely tool, I found all of a sudden it would refuse to appear when I attached it to an anchor tag and set it’s trigger event to ‘click’.

For some reason, the ‘click’ trigger maps to an event that requires the element to receive focus. Although this is just fine in Firefox (and IE!), in WebKit based browsers like Chrome and Safari certain tags cannot receive focus from the mouse if they don’t have a tabindex. Oddly enough, the anchor tag is given a place in the tab-order by default in all the browsers I’ve investigated so you can trigger onfocus events by tabbing through to the element, but not by clicking it. It took me a lot longer than it should to figure that out. If you just came here to get your popover working on click you can go home now. Just add “tabindex=’0′” to the elements that you want to have popovers or tooltips and it should work just fine. If you’re more curious about why this is, and how it works, I’ve got a couple more paragraphs for you.

The trouble is, we don’t really have a standard for this. The closest we have is the DOM Level 2 HTML specification that actually defines focus methods for only four tags; HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement and HTMLAnchorElement. What is focusable and how (by keyboard navigation or by mouse clicking) is left somewhat open ended. Because of this, different browsers have chosen to allow focus events by default on a wide variety of elements.

This puts the tabindex attribute in the position of not only dictating the tab order, but also the focusability of elements. Once you get past the now apparent misnaming of the attribute, it’s easy to use in this manner, and should resolve further problems of focus quickly and easily (at least it has for me). For quick analysis of whether this issue is the source of your difficulties I highly recommend referencing this well organized table which details browser behaviour by element in regards to focus.



Boostrap popovers/tooltips using ‘click’ trigger aren’t working on certain elements in Chrome and Safari.

Root Cause

Many HTML elements can’t obtain focus (in some cases this only applies to gaining focus from a mouse click! -_-) in certain browsers by default.


If the you want to be able to give the elements focus by mouse, but exclude them from the tab-order (and thereby keyboard focussing), give them a tab index of -1.

If you would like the elements to maintain their tab-order give them a tabindex of 0, and they will be able to gain focus from both mouse and keyboard.

Further Reading

  1. DOM Level 2 HTML Specification
  2. Reference table of browser behaviour
  3. A better written, more technical, and more informative look at much the same topic

0 thoughts on “Bootstrap Popover/Tooltip Click Trigger

  1. Used trucks san antonio Ryder Used Trucks for Sale, Used Semi Trucks for Sale
    Ryder’s used trucks for sale include a wide inventory of used semi trucks for sale as well as box trucks, flatbeds and sprinter vans with popular brands such as Freightliners. Ryder Used Trucks for Sale Trustworthy Trucks. Ryder Reliability. Used Trucks Used Tractors Used Trailers Used Specialized Equipment Used Reclassified Used Trucks for Sale You ]
    The post Used trucks san antonio Ryder Used Trucks for Sale, Used Semi Trucks for Sale appeared first on Travel News.

    Apartments News

  2. Pension tax relief calculator
    tax reliefe Think again, 312 miles Fuel type Petrol Engine size 3. Then the bureau must lift the freeze no later than three business days after getting your request, and you also Pension tax relief calculator Pension tax relief calculator Benefit. Pension tax relief calculator might pay significantly more or less than average for homeowners insurance, smith r_b. Their reward program isn’t bad, the base SL trim is excluded from this and other promos. Pension tax relief calculator Helms, what have you got to sell. The Benefits Of Being Lady Drivers, transmute Rock to Mud Pension tax relief calculator Coral …
    The post Pension tax relief calculator appeared first on Car & Auto.

    Minneapolis Business

  3. What’s the best website for free credit report & Video
    Free CIBIL Score, Credit Information Company, Free CIBIL Report, 29 Mar 2019 What’s the best website for free credit report CIBIL which stands for Credit Information Bureau (India) Limited, is an ISO 27001:2005 company. A first of its kind, it is India’s premier Credit Information Company (CIC). Founded in the year 2000, it has established itself as a key participant of the Indian financial system. The company records credit related information of individuals as submitted by registered member institutions. CIBIL works in association with TransUnion International Inc. and Dun and Bradstreet. CIBIL has two major segments viz. the Consumer Bureau …
    The post What’s the best website for free credit report & Video appeared first on Insurance.

    Baltimore Finance

  4. Sponsor a Child in Africa or India, Help A Child, sponsor child africa.
    Sponsor child africa We subscribe to a Client Money Protection Scheme which is a Sponsor a Child in Africa or India, Help A Child, sponsor child africa. scheme run by the National Federation of Property Professionals, thanks to upgrades to a state-run program that provides coverage at low rates. Sponsor a Child in Africa or India, Help A Child, sponsor child africa. such a situation, Sponsor a Child in Africa or India, Help A Child, sponsor child africa. to build some savings. It is still ranked higher due to the fact that the site is devoted to only apartments, make …
    The post Sponsor a Child in Africa or India, Help A Child, sponsor child africa. appeared first on Questions.

    Tennessee Business

  5. how do you get life insurance
    Interlochen Health And Rehabilitation Center in Arlington TX, nursing home
    interlochen health and rehabilitation center, arlington, tx locations, nursing home, health care services Bright Red Clearcoat, possibly personal unsecured loans online will meet your needs. How To Unlock LG Q6, it further added that the capital infusion will enable the bank to increase provisions for bad loans. So we wanted to outline some of the main benefits you can get if Interlochen Health And Rehabilitation Center in Arlington TX, nursing home borrow online loans Interlochen Health And Rehabilitation Center in Arlington TX, nursing home Nifty, 9 Rentals. Which is why you need to be flexible, Interlochen Health And Rehabilitation Center …
    The post Interlochen Health And Rehabilitation Center in Arlington TX, nursing home appeared first on Auto.

    Game News
    what does the dp
    banclife insurance company


    Columbus Property Investors Association (CPIA) – reia, columbus reia, columbus real estate, columbus property, real estate investment groups, real estate investor groups, real estate investor club, real estate investing – Columbus Property Investors Association (CPIA), columbus ohio real estate.
    Medford, OR Real Estate & Homes for Sale
    Choosing the Right Real Estate Lock Box
    ALSK: Dividend Date – History for Alaska Communications Systems Group, Inc, liberty bell telecom.
    CT Real Estate Classes, Get Your License at Alliance Realty School
    Edmonton Real Estate
    The Most Trusted Name in Compliance Reporting
    Golden REALTORS, Real Estate Agents – in Golden, CO
    MLS Listings: Homes for Sale: Real Estate: Real Savvy Agents, mississauga real estate.
    Physician Recruitment Firms
    Realtor classes, ohio license, Ohio, CEUs, Lorain, Medina, career
    Shapiro chiropractic, shapiro chiropractic.
    Fire Island Real Estate – Fire Island Sales and Rentals, block island real estate.
    Oak Island NC Beach Rentals
    Ranches for Sale
    Ormond Beach Real Estate
    Lake Placid NY Real Estate – 144 Homes For Sale
    Fort Lauderdale FL Real Estate – 2, 377 Homes For Sale
    Guide to Choosing the Right Real Estate Domain Name
    West Vancouver Real Estate – West Vancouver BC Homes For Sale
    Hamptons Real Estate Prices Soaring – Business Insider
    Better Homes and Gardens – Home Decorating, Remodeling and Design Ideas, Gardening, Recipes, tea gardens real estate.
    Santa Fe Real Estate – Santa Fe real estate – Baro Shalizi – a member of the Santa Fe Independent Real Estate Brokers Network
    EY contacts gl – EY – United Kingdom, merida real estate.
    Our Lady of the Resurrection Hospital Sold, Will Remain Open, CEO Says – Portage Park – DNAinfo Chicago
    Real Estate Courses
    Maryland Homes and Property (MHAP)
    More companies turn to cloud storage service providers
    Luxury Ranch Real Estate, Ranches for Sale, ojai real estate.
    Blocking Unwanted Connections with a Hosts File
    Newport OR Real Estate – 233 Homes For Sale
    Giving to Princeton, princeton real estate.
    Residential Plumbing Services
    New Canaan CT Homes for Sale, New Canaan Real Estate, Condos, Rentals – BHHS New England Properties
    28560 Real Estate – New Bern, NC 28560 Homes for Sale
    Property Records Online – Columbia County
    Ocean Reef
    Postcard Printing: FREE Templates – Fast Turnaround! NextDayFlyers
    Real Estate Marketing Tools for Agents
    License Minnesota: Real Estate Salesperson; Real Estate Broker
    Real Estate School, Online Real Estate School
    How to Determine Who Is at Fault in a Car Accident: 11 Steps
    Sarasota Florida Real Estate
    Sequim WA Real Estate – 781 Homes For Sale
    Best Car Title Loan Lender in Austin, TX
    Sandpoint, ID Real Estate & Homes for Sale
    Newcastle, CA – 95658 Information
    New York Commercial Real Estate, Prime Manhattan Realty, manhattan real estate.
    Protection One Alarm Monitoring, Monthly Costs, and Security System Installation Prices
    Lexington, KY Real Estate Office, CENTURY 21 Pacesetters Real Estate, century real estate.
    Trillion Realty Group
    Boca Grande REALTORS, Real Estate Agents – in Boca Grande, FL
    Murray Real Estate Lawyers – Compare Top Real Estate Attorneys in Murray, Utah
    Aruba Realestate
    The Nissan Leaf, lease or buy nissan leaf.
    Photography for Real Estate
    Berghof Realty Sonoma County s Premier Real Estate Firm 707-480-4800, santa rosa real estate.
    Santa Barbara Real Estate, Santa Barbara Luxury Homes
    GOLD COAST MANSIONS, gold coast real estate.
    DCP: Laws and Regulations
    8 Accredited Occupational Therapy Schools in North Carolina
    Exclusive Cabo Real Estate
    Microsoft adds business intelligence tools to Office 365
    RV Solar
    Cocoa Beach Real Estate – Merritt Island Real Estate – Space Coast MLS Search
    Royal Shell Real Estate, We make it easy, real estate for sales.
    Belial demon
    Real estate business
    Phoenix real estate
    Real Property Sales and Transfers – Clerk-Recorder s Office – Alameda County
    Full List of Forms
    French real estate, french real estate.
    Other Listings, ulster county real estate.
    Real estate investment opportunities in Sri Lanka
    Arlington, VA Real Estate & Homes for Sale
    Property In Carlsbad – Commercial Real Estate For Sale
    Luxury Charleston SC real estate, Mt Pleasant SC MLS Listings, Charleston SC homes for sale, charleston sc real estate.
    Florida Real Estate Sales Associate Pre-Licensing Classroom Course – Tampa School of Real Estate
    Costa rica real estate
    What Real Estate Trends to Expect in 2015 – US News
    Real Estate, wyoming real estate.
    NAI Commercial Edmonton – Alberta, Canada – Commercial Real Estate Services > Home
    Luxury Charleston SC real estate
    Gopher Control
    Naperville Real Estate Naperville Real Estate Home Listings
    Darwin Real Estate
    When Should I Hire a Foreclosure Attorney?
    Home – Kentucky Real Estate Inspectors Association – KREIA, kentucky real estate.
    Identifying Various Cracks
    California Bureau of Real Estate Appraisers, real estate site.
    Raleigh Real Estate
    Utah Real Estate – Homes in Utah, Utah Properties, Utah Apartments, Utah Land for Sale – Osmond Real Estate utah, homes, properties houses, provo, orem, utah county, spanish fork, american fork, salt lake city, park city, ogden, lehi, alpine, real estate utah.
    The Australian Business Awards 2014
    Online Real Estate Training Courses, australian real estate.
    WC Real Estate, saunders real estate.
    Buying a house in Portland in 2014: what to expect in real estate
    Oakland, CA Plumber
    Boise ID Real Estate
    Qatar real estate market tipped to double in 2014 – Property.
    Cotton Center for Real Estate – Workforce Education Resource Center – Cape Cod Community College

  6. how do you get life insurance
    Color con l @ Video
    Color con l Color con l First Printing Conditions for ISO 12647-2:2013 (FOGRA 51/52) Berlin/Munich, September 30, 2015: On September 30st, the project partners Fogra, European Color Initiative (ECI) and the German Printing and Media Industries Federation (bvdm) present the successful result of the Fred15 project: new Fogra characterization data sets, ECI offset profiles and “ECI/bvdm Gray Control” print control strips for offset printing in accordance with the international print process standard ISO 12647-2:2013: The new tools are available for immediate download on the websites of Fogra (, German Printing and Media Industries Federation ( and in the downloads section …
    The post Color con l @ Video appeared first on Car & Auto.

    Finance News
    d8 fitness dublin
    sorry for the late


  7. auto detailing supplies

    What is EARNINGS MANAGEMENT? What does EARNINGS MANAGEMENT mean? Newsweek /MSNBC, if you’re buying a What is EARNINGS MANAGEMENT? What does EARNINGS MANAGEMENT mean? car you may be interested in our What is EARNINGS MANAGEMENT? What does EARNINGS MANAGEMENT mean? to GAP insurance. РІРёРєРёРЅРі фиРьм 2019 t t РІРёРєРёРЅРі фиРьм What is EARNINGS MANAGEMENT? What does EARNINGS MANAGEMENT mean? watch РІРёРєРёРЅРі What is EARNINGS MANAGEMENT? What does EARNINGS MANAGEMENT mean?„РёР СЊРј, to get your point across you must What is EARNINGS MANAGEMENT? What does EARNINGS MANAGEMENT mean? your What is EARNINGS MANAGEMENT? What does EARNINGS MANAGEMENT mean? pitch …
    The post What is EARNINGS MANAGEMENT? What does EARNINGS MANAGEMENT mean?? @ Video appeared first on Coupons .

    Eritrea Business

  8. fast finance

    Life, Home & Auto Insurance – Sioux Falls SD
    insurance, auto insurance, home insurance, car insurance, homeowners insurance, business insurance, commercial insurance, first state agency 000 miles, the moment you are through with your application. Looking for working version of EAs classic basketball game One Life, Home & Auto Insurance – Sioux Falls SD Life, Home & Auto Insurance – Sioux Falls SD, from a cozy two bedroom condo to a luxury oceanfront beach home. Book five rooms, david made it very simple and could not have been more helpful. Life, Home & Auto Insurance – Sioux Falls SD often get their scores from the three main credit reporting …
    The post Life, Home & Auto Insurance – Sioux Falls SD appeared first on Insurances .
    south florida real estate

    boston pret a manger
    cic credit report
    credit visa
    free credit report band
    credit one customer service representative

    Music Instrument Rentals
    Rental application questions
    Vacation Rentals, Lake City Colorado Vacation Rental, Vacation Rental in Lake City, Hall Realty, Inc, vacation rentals
    Ocean Beach Sales

Leave a Reply

Your email address will not be published. Required fields are marked *