Blueprint: Backdrop dismissable only on non-touch devices

Created on 7 Jan 2017  路  9Comments  路  Source: palantir/blueprint

I think this is more a feature request, but the canOutsideClickClose option for dialogs, popovers and the like listen to mouse down and not click event, making it impossible to dismiss them on mobile devices.

Any particular reason that choice was made?

Thanks!

Mobile aged away bug help wanted

Most helpful comment

@danqing it occurred to me that this can be implemented "after-market" using backdropProps:

// warning: partial pseudocode example
<Overlay backdropProps={{ onTouch: this.closeOverlay }}> ... </Overlay>

All 9 comments

Yep there's a very simple reason: mobile support is not a concern for Palantir products at this time. Everything happens on desktop machines with mice and big screens. As such, Blueprint's mobile support story is minimal and very low priority for the team.

However, we welcome community PRs for adding mobile support!
For instance, this recent gem #265 which added touch support to Slider 馃帺

Yes his is easy to achieve and I'll probably send in a PR.

I also really like the framework - great job! However, I'd really appreciate if you can have some basic level of mobile support - sometimes mobile requires something significantly different from desktop and I totally understand, but listening to only mouse but not touch events (as in this case) seems to me like "we don't think about touch screens at all". (Totally not intending to be negative.)

While we are more than happy to accept mobile support PRs, the team doesn't have the bandwidth or urgency to implement it ourselves: it's simply not a business concern. To put it bluntly, we have more important things to do 馃

You are right: we actually don't think about touch screens at all.

if mobile-first is a deep concern of yours then unfortunately i suggest you turn elsewhere.

from the repo readme:

[Blueprint] is optimized for building complex, data-dense web interfaces for _desktop applications_. If you rely heavily on mobile interactions and are looking for a mobile-first UI toolkit, this may not be for you.

Makes sense. In that case I'll just make the change myself. Thanks!

Closing.

Actually, we'd like to keep this issue open -- we are open to accepting PRs to support this behavior.

@danqing it occurred to me that this can be implemented "after-market" using backdropProps:

// warning: partial pseudocode example
<Overlay backdropProps={{ onTouch: this.closeOverlay }}> ... </Overlay>

Thanks for the note! I've implemented my own but I'm sure it will be useful for others.

Btw it can be fixed by adding touchStart to all places where mouseDown occurs if anyone decides to actually support it.

@danqing if your change isn't breaking, you're welcome to open up a PR. We've accepted PRs adding mobile support in the past, for instance: https://github.com/palantir/blueprint/pull/265

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zsherman picture zsherman  路  33Comments

zhaoyi0113 picture zhaoyi0113  路  21Comments

ripitrust picture ripitrust  路  19Comments

dmackerman picture dmackerman  路  46Comments

Hexxeh picture Hexxeh  路  18Comments