Gui button select all scene

Hi,

I am using BABAYLON.GUI button in my scene, I have couple of issues:

1. First issue is when I click and hold one of button on safari iPhone, my whole scene becomes blue ( like selected everything to copy ), how to avoid this?

here is normal screen when not clicked on button:

here when I long click on one of button:

2. how to have different size of GUI buttons on mobile.

Thanks

  1. this is because safari is selecting the canvas :slight_smile: There is a CSS rule to prevent that from happening but I can’t remember which one. ANyway this is a pure html issue
  2. Simply sniff the screen resolution and update the size (or sniff the user agent but this is probably not the best idea)
1 Like

Thank you boss @Deltakosh, I could see myself getting old in here

  1. to disable touch stuff, I had to use below CSS rule,

         * {
             -webkit-touch-callout: none;
             -webkit-user-select: none;
             -khtml-user-select: none;
             -moz-user-select: none;
             -ms-user-select: none;
             user-select: none;
             outline: none;
             -webkit-tap-highlight-color: rgba(255, 255, 255, 0); /* mobile webkit */
         }   
    

I had to use * , cause I was having same issue with buttons if I add rule only to canvas.

  1. I ended up using the not best idea by sniffing user agent string :slight_smile: , seems more faster to implement for now.
1 Like

lol this is fine :smiley:

1 Like

See Both and @Deltakosh, this is exactly why I posted a rageous comment this morning addressed to Apple about the faen behavior of this piece of useless browser that is Safari on iOS (not about this particular issue, but in general).

I knew (sort of remembered) of something like this when I bounced into this very same issue over the WE. Though it took me 20mins to get to this post (because I didn’t know how to form my question).
THIS SHOULD BE BOLD AND CLEAR EVERYWHERE. Css, js, bjs or any app or framework that is (forced to) make use of this piece of crap that is Safari on iOS.

1 Like

I can’t agree more…Safari is a dumpster fire crap