Announcement

Collapse
No announcement yet.

Need to eliminate the search input field border when clicked?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need to eliminate the search input field border when clicked?

    I'm not seeing where the focus and focus-visible classes are being added to the Search Input Field after the input field is clicked. I need to stop the border from rendering. How can I prevent the border on the input field?

    My attempts in "dev tools" to remove the data-attributes or other classes haven't worked. In other words, I'm not finding the trigger.

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    #2
    Hi Scott,

    At the moment, I cannot see a way to remove the focus from the input. It does look like something is being dynamically added, but I am unable to track it down. I will continue to investigate and see if I can get this addressed for the next Shadows release when I am doing an accessibility revamp.
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      BTW: The only place I've seen a "focus" class is in the extensions.css. Not sure if that helps you track it down.
      Also, I couldn't seem to determine the target, but in dev tools I clicked off a block, or inline-block, for one of the classes and eliminated the border, but also other elements. Reworking the classes if I found the target would have made a mess anyway.

      It looks like I need some kind of workaround regardless until this styling can be tamed.

      This is a potential solution for me to remove a class from a related container. Is there a built-in function for me to be able to add "class to remove" or do I need to recreate my own? (I have a different container with a different border styling)

      Scott
      IDS
      Last edited by ids; 01-05-22, 10:53 AM.
      Need to offer Shipping Insurance?
      Interactive Design Solutions https://www.myids.net
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      Competitive Rates, Custom Modules and Integrations, Store Integration
      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
      My T-shirt Collection is mostly MivaCon T-shirts!!

      Comment


        #4
        Hey Scott,

        There are some built-in functions having to do with the search preview, you could try looking at User Interface -> Global Settings -> Search Settings -> Search Preview Settings -> JavaScript Template.
        Matt Zimmermann

        Miva Web Developer
        Alchemy Web Development
        https://www.alchemywebdev.com
        Site Development - Maintenance - Consultation

        Miva Certified Developer
        Miva Professional Developer

        https://www.dev4web.net | Twitter

        Comment


          #5
          Thanks.
          Took a quick look. Appears that it will take longer to try and adapt something than to roll my own. But, I am reminded that this isn't what we want in the design of this element, to begin with.

          Scott
          Need to offer Shipping Insurance?
          Interactive Design Solutions https://www.myids.net
          MivaMerchant Business Partner | Certified MivaMerchant Web Developer
          Competitive Rates, Custom Modules and Integrations, Store Integration
          AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
          My T-shirt Collection is mostly MivaCon T-shirts!!

          Comment


            #6
            Matt,

            Since I do not see a class definition of "focus" anywhere in the CSS or JS, is it possible that something is listening for a click and 'focus'?

            Scott
            Need to offer Shipping Insurance?
            Interactive Design Solutions https://www.myids.net
            MivaMerchant Business Partner | Certified MivaMerchant Web Developer
            Competitive Rates, Custom Modules and Integrations, Store Integration
            AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
            My T-shirt Collection is mostly MivaCon T-shirts!!

            Comment


              #7
              Hi Scott,

              That's a possibility, but that is what I am not finding. It's going to require a bit of a deep-dive.
              Matt Zimmermann

              Miva Web Developer
              Alchemy Web Development
              https://www.alchemywebdev.com
              Site Development - Maintenance - Consultation

              Miva Certified Developer
              Miva Professional Developer

              https://www.dev4web.net | Twitter

              Comment


                #8
                Originally posted by Matt Zimmermann View Post
                Hi Scott,

                That's a possibility, but that is what I am not finding. It's going to require a bit of a deep-dive.
                FWIW - I've tried looking too. I've even tried (like Scott has) to override the "focus" class style that gets added when you click in the search input field. My gut is it's definitely something in the javascript somewhere that adds the "focus" to the
                Code:
                input class="c-form-input c-control-group__field u-bg-transparent u-border-none focus"
                the focus class "overrules" the u-border-none class to put that gray border (highlight?) inside or around the input field. Not sure why it's so convoluted, it's a real PIA...
                Leslie Kirk
                Miva Certified Developer
                Miva Merchant Specialist since 1997
                Previously of Webs Your Way
                (aka Leslie Nord leslienord)

                Email me: [email protected]
                www.lesliekirk.com

                Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                Comment


                  #9
                  ids If using Chrome, the black border that shows around the search field when clicked into is part of the 'user-agent stylesheet'. So it's not actually part of the framework css, but the browser, adding an 'outine'.

                  You should be able to remove it by using one the following:

                  Remove only from 'input' fields:
                  Code:
                  input:focus-visible {
                      outline: none;
                  }
                  To remove from Search field specifically:
                  Code:
                  .t-site-header__search-form .c-form-input:focus-visible {
                      outline: none;
                  }
                  ​​​​​​​cc: Matt Zimmermann

                  Comment


                    #10
                    Good point Bryan Trautloff , the browsers have been adding more accessibility friendly defaults to their user-agent stylesheets.
                    Matt Zimmermann

                    Miva Web Developer
                    Alchemy Web Development
                    https://www.alchemywebdev.com
                    Site Development - Maintenance - Consultation

                    Miva Certified Developer
                    Miva Professional Developer

                    https://www.dev4web.net | Twitter

                    Comment


                      #11
                      Thank you, Bryan. That solved it for me.

                      Scott
                      Need to offer Shipping Insurance?
                      Interactive Design Solutions https://www.myids.net
                      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
                      Competitive Rates, Custom Modules and Integrations, Store Integration
                      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
                      My T-shirt Collection is mostly MivaCon T-shirts!!

                      Comment

                      Working...
                      X