Hype emits elements in DOM div order that does not match tool view

The Hype runtime DOM order is based on a top-left element location. This is to better help accessibility/assistive devices which use DOM ordering to read out the ordering of elements. We intentionally made this change in Hype v3.6.

I'd be curious as to your use case for depending on a DOM ordering?

As older versions of Hype did DOM elements by z-index; we left this behavior in the app through a hidden default which you can enable by typing this into the terminal:

defaults write com.tumult.Hype4 elementInsertionOrderSortMethod "compareByZOrdering:"

To get back, use this command:

defaults delete com.tumult.Hype4 elementInsertionOrderSortMethod

(and if using the setapp version, change the bundle identifier to com.tumult.hype-setapp)

However, this does in no way guarantee that the editor will ever be the same as the output, simply that the output is ordered in a specific way.

1 Like