The default bug view has changed. See this FAQ.

GCLI places input elements incorrectly if element ancestory has a 'fixed' or 'absolute'

RESOLVED FIXED in Firefox 18

Status

()

Firefox
Developer Tools: Console
--
major
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Grant Gayed, Assigned: jwalker)

Tracking

unspecified
Firefox 18
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed-in-fx-team])

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

5 years ago
Created attachment 636970 [details] [diff] [review]
patch

- this affects Orion's use of GCLI because Orion's use of dojo creates elements that currently throw off the positioning of GCLI's input elements

Steps:
- start with the example index.html from GCLI's root dir
- put its "gcli-display" and "gcli-input" elements into a div, so that they now look like:

<div style="position:absolute;top:100px;width:100%;height:70%;">
  <div id="gcli-display"></div>
  <input id="gcli-input" type="text" autofocus/>
</div>

- view the page
- the GCLI-created input elements are placed incorrectly because their absolute positions are computed in Inputter.prototype.getDimensions() relative to the document origin, but if there's a 'fixed' or 'absolute' ancestor then at render time this position will be considered to be relative to that element, not to the document origin

- patch that demonstrates a possible fix is attached
Attachment #636970 - Attachment is patch: true
Attachment #636970 - Flags: review+
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
This code should not affect firefox, but does alter gcli.jsm so we need to check that there is no breakage.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: FIXED → ---
Created attachment 655412 [details] [diff] [review]
v2

Updates for gcli.jsm
Assignee: nobody → jwalker
Attachment #636970 - Attachment is obsolete: true
Status: REOPENED → ASSIGNED
Created attachment 656380 [details] [diff] [review]
v3

Minor fix. We need to ensure that we're using the correct document. This is important both for when gcli is in an iframe, and for when it's embedded in a xul document.
Attachment #655412 - Attachment is obsolete: true
https://tbpl.mozilla.org/?tree=Try&rev=95edd1e1af78
https://tbpl.mozilla.org/?tree=Fx-Team&rev=3636c402ea3d
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/3636c402ea3d
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
You need to log in before you can comment on or make changes to this bug.