Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Conversation

@as-cii
Copy link
Contributor

@as-cii as-cii commented Mar 29, 2017

The security model of new Chromium versions forbids all event listeners, except for onDragStart and onDrop, to inspect the data values that have been previously set on the event's dataTransfer object.

To circumvent this problem we can exploit the fact that all we need to do is checking whether a boolean has been set or not. To do so, we will simply list all the items contained in the dataTransfer object and read their type property (that we use as a dictionary key), verifying that at least one of them contains the key we are searching for.

Before:

screen shot 2017-03-29 at 16 30 51

After:
screen shot 2017-03-29 at 16 31 16

/cc: @atom/maintainers

The security model of new Chromium versions forbids all event listeners,
except for `onDragStart` and `onDrop`, to inspect the data values that
have been previously set on the event's `dataTransfer` object.

To circumvent this problem we can exploit the fact that all we need to
do is checking whether a boolean has been set or not. To do so, we will
simply list all the items contained in the `dataTransfer` object and
read their `kind` property (that we use as a dictionary key), verifying
that at least one of them contains the key we are searching for.
@as-cii as-cii force-pushed the as-fix-missing-drop-indicator branch from 4812bb9 to c3725a6 Compare March 29, 2017 14:33
@thomasjo thomasjo mentioned this pull request Mar 29, 2017
17 tasks
@as-cii as-cii merged commit 5227c7d into master Mar 30, 2017
@as-cii as-cii deleted the as-fix-missing-drop-indicator branch March 30, 2017 13:43
@daviwil daviwil mentioned this pull request Dec 20, 2018
59 tasks
@rafeca rafeca mentioned this pull request Jun 25, 2019
7 tasks
@lkashef lkashef mentioned this pull request Jul 16, 2020
76 tasks
@sadick254 sadick254 mentioned this pull request Dec 1, 2020
58 tasks
@sadick254 sadick254 mentioned this pull request Aug 19, 2021
64 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants