Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs][Drawer] Right-anchored persistent drawer intercepts click while closed #29997

Closed
2 tasks done
gla3dr opened this issue Dec 1, 2021 · 6 comments · Fixed by #39318
Closed
2 tasks done

[docs][Drawer] Right-anchored persistent drawer intercepts click while closed #29997

gla3dr opened this issue Dec 1, 2021 · 6 comments · Fixed by #39318
Labels
bug 🐛 Something doesn't work component: drawer This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation package: material-ui Specific to @mui/material ready to take Help wanted. Guidance available. There is a high chance the change will be accepted

Comments

@gla3dr
Copy link

gla3dr commented Dec 1, 2021

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

When a right-anchored persistent drawer is closed, it intercepts clicks in its "area" as if it were open.

persistent-drawer-bug.mp4

Expected behavior 🤔

Behavior should be the same as it currently is for a left-anchored persistent drawer.

When a right-anchored persistent drawer is closed, I should be able to click on elements or select text that is in the area taken up by the drawer when it is open.

Both behaviors can be seen in the video in "Current behavior".

Steps to reproduce 🕹

Steps:

The documentation page or the default codesandbox for this component is enough to reproduce: https://codesandbox.io/s/n5rze?file=/demo.js

  1. Open the sandbox
  2. Try to highlight text in the right-most 240 pixels of the screen where the drawer would be if it was open
  3. Move your cursor back and forth across the 240-pixels from the right boundary and notice that it switches between and I-beam and a pointer.

Context 🔦

I would like to be able to place components in the area of the drawer when it is closed that can be clicked on to open the drawer.

If this is a z-index issue, then this issue may be similar, but I don't believe it is the same: #29878

Your environment 🌎

Reproduced in both Chrome 96.0.4664.45 (Official Build) (64-bit) and Firefox 94.0 (64-bit) on Ubuntu 20.04.3 LTS (Focal Fossa)

`npx @mui/envinfo` Server:
  System:
    OS: Linux 3.10 CentOS Linux 7 (Core)
    CPU: (4) x64 Intel Xeon Processor (Skylake, IBRS)
    Memory: 379.38 MB / 7.80 GB
    Container: Yes
    Shell: 4.2.46 - /bin/bash
  Binaries:
    Node: 14.18.1 - /usr/bin/node
    npm: 6.14.15 - /usr/bin/npm
  Managers:
    pip3: 21.3 - /usr/local/bin/pip3
    RubyGems: 2.0.14.1 - /usr/bin/gem
    Yum: 3.4.3 - /usr/bin/yum
  Utilities:
    CMake: 2.8.12.2 - /usr/bin/cmake
    Make: 3.82 - /usr/bin/make
    GCC: 4.8.5 - /usr/lib64/ccache/gcc
    Git: 2.17.0 - /usr/bin/git
    Subversion: 1.7.14 - /usr/bin/svn
  Servers:
    Apache: 2.4.6 - /usr/sbin/apachectl
  IDEs:
    Nano: 2.3.1 - /usr/bin/nano
    Vim: 7.4 - /usr/bin/vim
  Languages:
    Bash: 4.2.46 - /usr/bin/bash
    Java: 15.0.2 - /usr/bin/javac
    Perl: 5.16.3 - /usr/bin/perl
    Protoc: 3.5.0 - /usr/bin/protoc
    Python: 2.7.5 - /usr/bin/python
    Python3: 3.6.8 - /usr/bin/python3
    Ruby: 2.0.0 - /usr/bin/ruby
  Databases:
    SQLite: 3.7.17 - /usr/bin/sqlite3
  Browsers:
    Firefox: support!
Mozilla Firefox 60.8.0

Client:

  System:
    OS: Linux 5.4 Ubuntu 20.04.3 LTS (Focal Fossa)
  Binaries:
    Node: 10.19.0 - /usr/bin/node
    Yarn: Not Found
    npm: 6.14.4 - /usr/bin/npm
  Browsers:
    Chrome: 96.0.4664.45
    Firefox: 94.0
@gla3dr gla3dr added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 1, 2021
@gla3dr gla3dr changed the title Right persistent drawer intercepts cursor when closed Right-anchored persistent drawer intercepts cursor when closed Dec 1, 2021
@gla3dr gla3dr changed the title Right-anchored persistent drawer intercepts cursor when closed Right-anchored persistent drawer intercepts cursor while closed Dec 1, 2021
@mnajdova mnajdova added bug 🐛 Something doesn't work component: drawer This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 2, 2021
@mnajdova mnajdova changed the title Right-anchored persistent drawer intercepts cursor while closed [Drawer] Right-anchored persistent drawer intercepts click while closed Dec 2, 2021
@mnajdova

This comment was marked as outdated.

@mnajdova mnajdova added the ready to take Help wanted. Guidance available. There is a high chance the change will be accepted label Dec 2, 2021
@gla3dr
Copy link
Author

gla3dr commented Dec 2, 2021

Looks like that fix works. PR created 👍

@niishaaant
Copy link

Is the issue resolved or are we still looking for another solution as mentioned in the PR?

@mnajdova
Copy link
Member

Is the issue resolved or are we still looking for another solution as mentioned in the PR?

It haven't been resolved, looks like the proposed solution in #29997 (comment) breaks something else.

@alzaar
Copy link

alzaar commented Sep 2, 2023

Is it possible to trigger the pipeline checks locally ?

@alzaar
Copy link

alzaar commented Sep 16, 2023

I have a PR for this issue, would it be possible for anyone to review it ? The PR has a green pipeline.
The issue mentioned involves changing the css properties for the right drawer as the drawer component comes after the main tag which ranks higher in the stacking context preventing the user from selecting the text. I can take care of cleaning up of the commit history or anything else that is remaining with the PR.
PR

@ZeeshanTamboli ZeeshanTamboli added package: material-ui Specific to @mui/material docs Improvements or additions to the documentation labels Sep 25, 2023
@ZeeshanTamboli ZeeshanTamboli changed the title [Drawer] Right-anchored persistent drawer intercepts click while closed [docs][Drawer] Right-anchored persistent drawer intercepts click while closed Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: drawer This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation package: material-ui Specific to @mui/material ready to take Help wanted. Guidance available. There is a high chance the change will be accepted
Projects
None yet
5 participants