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

should search for draggable attribute follow dom tree or flattened tree? #10185

Open
dbaron opened this issue Mar 7, 2024 · 2 comments
Open

Comments

@dbaron
Copy link
Member

dbaron commented Mar 7, 2024

What is the issue with the HTML Standard?

Right now it seems that the spec requires that the search for a draggable attribute when a drag is initiated go up the "ancestor chain", which I presume refers to the document tree. However, we got Chromium bug 328263459 reporting that the behavior in Firefox differs (while Chrome and Safari match my interpretation of the current spec), and Firefox at least appears to search the flattened tree ancestors. The reporter of that bug prefers the Firefox behavior (reasonably, I think).

I'm curious if others agree with my analysis of the current spec, and what you think about whether the current spec should change or not.

@smaug----
Copy link
Collaborator

If I read the code correctly, https://searchfox.org/mozilla-central/rev/6b1e306175c2284958fb185bab388021e2890ed0/dom/base/nsContentAreaDragDrop.cpp#324-331 is where Gecko gets flattened tree behavior. And I think Gecko's behavior is quite reasonable.

Looks like the spec uses term "ancestor chain" also in couple of other places, yet its meaning isn't clearly defined. Though I agree I'd assume non-shadow boundary crossing ancestor chain when reading it.

@emilio

@emilio
Copy link
Contributor

emilio commented Mar 7, 2024

https://bugzilla.mozilla.org/show_bug.cgi?id=1734870 and https://bugzilla.mozilla.org/show_bug.cgi?id=1767938 are some relevant changes here. Before the later one our draggable handling was completely busted IIUC. But yeah, I think flattened tree makes sense here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants