Closed Bug 624151 Opened 13 years ago Closed 13 years ago

Better positioning for the invalid form popup

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 4.0b10

People

(Reporter: mounir, Assigned: mounir)

References

Details

Attachments

(1 file)

This was originally part of bug 619223 but split to make things easier.

We should prevent this situation:
http://fredericiana.com/wp-content/uploads/2010/12/html5-feedback-forms-1.jpg
Attached patch Patch v1Splinter Review
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #502257 - Flags: review?(enndeakin)
Whiteboard: [needs-review]
Comment on attachment 502257 [details] [diff] [review]
Patch v1

>+    let style = element.ownerDocument.defaultView.getComputedStyle(element, null);

This should be inside the else block.

>+    } else {
>+      offset = parseInt(style.paddingLeft) + parseInt(style.borderLeftWidth);
>+      position = "after_start";
>+    }

Do you need to use the right padding and border for rtl? Unfortunately, it doesn't look like paddingStart/borderStartWidth is implemented for getComputedStyle.
Attachment #502257 - Flags: review?(enndeakin) → review+
(In reply to comment #2)
> Comment on attachment 502257 [details] [diff] [review]
> Patch v1
> 
> >+    let style = element.ownerDocument.defaultView.getComputedStyle(element, null);
> 
> This should be inside the else block.
> 
> >+    } else {
> >+      offset = parseInt(style.paddingLeft) + parseInt(style.borderLeftWidth);
> >+      position = "after_start";
> >+    }
> 
> Do you need to use the right padding and border for rtl? Unfortunately, it
> doesn't look like paddingStart/borderStartWidth is implemented for
> getComputedStyle.

Indeed, I should change that.
Attachment #502257 - Flags: approval2.0?
Whiteboard: [needs-review] → [needs-approval]
Whiteboard: [needs-approval] → [needs approval][passed try]
Comment on attachment 502257 [details] [diff] [review]
Patch v1

a=beltzner
Attachment #502257 - Flags: approval2.0? → approval2.0+
Pushed:
http://hg.mozilla.org/mozilla-central/rev/d910f58e6c9c
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [needs approval][passed try]
Target Milestone: --- → Firefox 4.0b10
Depends on: 628695
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: