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

Add pointer-events:none; to hidden font container #11

Merged
merged 1 commit into from Dec 5, 2017

Conversation

kevinbarabash
Copy link
Member

opacity:0; isn't enough for Firefox to ignore the hiddent font
container which results in the text cursor showing up and mouse
events not getting through to the canvas. This diff adds
pointer-events:none; to the container so that Firefox ignores
it completely. Diffs for live-editor and webapp will be done using
phabricator.

Test Plan:

Summary:
opacity:0 isn't enough for Firefox to ignore the hiddent font
container which results in the text cursor showing up and mouse
events not getting through to the canvas.  This diff adds
pointer-events:none; to the container so that Firefox ignores
it completely.

Test Plan:
- build live-editor
- load http://localhost:8080/computer-programming/new/pjs
- hover over the upper-left corner of the canvas
- see that the mouse cursor is always the arrow

Reviewers: ian john
Copy link

@idreyn idreyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kevinbarabash kevinbarabash merged commit 66bec3a into master Dec 5, 2017
kevinbarabash added a commit to Khan/live-editor that referenced this pull request Dec 5, 2017
Summary:
opacity:0; isn't enough for Firefox to ignore processing-js' hiddent font
container which results in the text cursor showing up and mouse
events not getting through to the canvas. This diff adds
pointer-events:none; to the container so that Firefox ignores
it completely.

Change to processing-js is in Khan/processing-js#11.

Test Plan:
- npm run build
- load http://localhost:8080/computer-programming/new/pjs (in Firefox)
- hover over the upper-left corner of the canvas
- see that the mouse cursor is always the arrow

Reviewers: joshua, idr

Reviewed By: idr

Differential Revision: https://phabricator.khanacademy.org/D41143
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants