[Webkit-unassigned] [Bug 29961] Position of "Close" button in docked mode doesn't match the position of window "Close" button in detached mode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 1 07:53:18 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=29961


Timothy Hatcher <timothy at hatcher.name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #40440|review?                     |review-
               Flag|                            |




--- Comment #3 from Timothy Hatcher <timothy at hatcher.name>  2009-10-01 07:53:19 PDT ---
(From update of attachment 40440)


> +    // Place "Close" button in docked mode on the same side as the window "Close" button in detached mode.
> +    var closeElement;
> +    if (InspectorController.platform().substr(0, 3) == "mac") {
> +        closeElement = document.getElementById("close-left");
> +    } else {
> +        closeElement = document.getElementById("close-right");
> +    }
> +    var closeButton = document.createElement("button");
> +    closeButton.id = "close-button";
> +    closeButton.addEventListener("click", this.close, true);
> +    closeElement.appendChild(closeButton);

You can do more this in CSS. Using the .platfor-mac and .platform-win classes.

So attach the listener to both elements and let CSS decided what one to show
and hide. And have the button in both.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list