googlearchive / chromedeveditor

Chrome Dev Editor is a developer tool for building apps on the Chrome platform - Chrome Apps and Web Apps, in JavaScript or Dart. (NO LONGER IN ACTIVE DEVELOPMENT)
BSD 3-Clause "New" or "Revised" License
2.92k stars 413 forks source link

Investigate: spark-suggest-box items unclickable on Win/Linux unless overlay forced to be stacking context #1320

Open ussuri opened 10 years ago

ussuri commented 10 years ago

I was forced to add the following to spark-suggestion-box.css:

#suggestion-list-overlay {
  ...
  -webkit-transform: scaleZ(1);
  transform: scaleZ(1);
}

My guess is that this transform creates a stacking context, as described here, which somehow affects the event propagation order.

Without that no-op -webkit-transform (or, equivalently, any other stacking context-creating mechanism as described in the article), the items in the suggest box become unclickable on Linux and Windows only in the following sense: the 'click' event arriving at SparkSelector.clickHandler() has target pointing at the SparkSelector object itself, with eventPhase==AT_TARGET. On MacOS and ChromeOS, the same event event has target pointing at the clicked item (or its descendant, for composited items), with eventPhase==BUBBLING, which in my understanding is what should be expected.

Possible other factors that may play a role in all this:

Versions where the above has been observed/debugged: Dart Editor: 1.2.0 bleeding edge, 1.3.0.dev_03_02 (DEV) Dart SDK: 1.2.0 bleeding edge, 1.3.0-dev.3.2 Chromium: Linux 35.0.1883.0 dev aura, Windows 33.0.1750.149 m, MacOS 33.0.1750.149 & 35.0.x.x Polymer: 0.9.5 & 0.10.0-pre.1

sunglim commented 10 years ago

This is totally really awesome analysis. :clap:

ussuri commented 10 years ago

:)