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

Embed Block: handle click events #1002

Closed
mtias opened this issue Jun 2, 2017 · 12 comments
Closed

Embed Block: handle click events #1002

mtias opened this issue Jun 2, 2017 · 12 comments
Labels
[Feature] Blocks Overall functionality of blocks General Interface Parts of the UI which don't fall neatly under other labels. [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@mtias
Copy link
Member

mtias commented Jun 2, 2017

Should we catch all click events occuring within the iframe/embed content and disable them in the editor context? That could be an easy way of not needing an overlay but preventing video from playing, tweets from navigating away, etc.

@mtias mtias added [Feature] Blocks Overall functionality of blocks General Interface Parts of the UI which don't fall neatly under other labels. Design [Type] Question Questions about the design or development of the editor. labels Jun 2, 2017
@aduth
Copy link
Member

aduth commented Jun 2, 2017

@mtias
Copy link
Member Author

mtias commented Jun 2, 2017

Right, the implementation can still be through an overlay, just not a visible one.

@westonruter
Copy link
Member

Using pointer-events:none with tabindex=-1 seems to work without having to add an overlay: https://jsfiddle.net/westonruter/11279unb/

@ellatrix
Copy link
Member

ellatrix commented Jun 5, 2017

@westonruter Nice! Do you need the tabIndex? Seems to work fine here without.

@westonruter
Copy link
Member

@iseulde yes, the tabIndex is needed as otherwise you can tab into the iframe window.

@ellatrix
Copy link
Member

ellatrix commented Jun 5, 2017

That's okay, right?

@westonruter
Copy link
Member

I thought the goal was to prevent a user from interacting with an iframe? If they can tab inside of an iframe, then this wouldn't happen:

preventing video from playing, tweets from navigating away, etc.

@ellatrix
Copy link
Member

ellatrix commented Jun 5, 2017

Well, we'd prevent it as long as the block is not selected. If the block is selected, they can interact with it? (Same as core now.) So we take pointer-events: none away for .is-selected. Tabbing wouldn't matter for this.

@ellatrix
Copy link
Member

ellatrix commented Jun 5, 2017

@westonruter Like this? 79495e0

@westonruter
Copy link
Member

OK, I didn't realize that the iframe should be able to be interacted with if the block is selected.

@mtias mtias added this to the Beta milestone Jun 6, 2017
@mtias mtias changed the title Embeds: click event Embeds: handle click events Jun 6, 2017
@mtias mtias added [Type] Task Issues or PRs that have been broken down into an individual action to take and removed [Type] Question Questions about the design or development of the editor. labels Jun 6, 2017
@mtias mtias changed the title Embeds: handle click events Embed Block: handle click events Jun 6, 2017
@mtias mtias modified the milestones: Beta 2, Beta Jun 15, 2017
@ellatrix ellatrix removed their assignment Aug 7, 2017
@jasmussen
Copy link
Contributor

Just cross referencing this with #483

@mtias
Copy link
Member Author

mtias commented Nov 20, 2017

Let's just keep one. Closing in favor of #483.

@mtias mtias closed this as completed Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks General Interface Parts of the UI which don't fall neatly under other labels. [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

No branches or pull requests

5 participants