Opened 11 years ago
Closed 11 years ago
#26824 closed defect (bug) (fixed)
Always ltr input elements
Reported by: | dll1024 | Owned by: | yoavf |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch 2nd-opinion |
Focuses: | rtl | Cc: |
Description
some input element must be always ltr. for example URL or Email address is always english and it have bad view in rtl inputboxes.
Attachments (5)
Change History (16)
#1
@
11 years ago
It can fix by adding a class="ltr" attribute to this elements and add a css code for it.
html:
<input type="email" name="myemail" class="ltr" />
css:
.ltr{direction:ltr;}
#2
@
11 years ago
I think it would be better to avoid adding a class to the input. If all email inputs need to be ltr a simple rule input[type="email"] would work.
#3
@
11 years ago
- Component changed from RTL to Administration
- Focuses rtl added
We automatically LTR an element with the "code" class, at the very least. I could be OK with a class here but yes, an attribute selector would be nice if possible. (I'd prefer a semantic class like "email" rather than "ltr", though.)
#4
@
11 years ago
It looks like some of the url input already have a class of code on them. Would it be best to update these from type="text" to type="url" then adding a rule like the following?
input[type="email"],input[type="url"]{ direction: ltr; }
#6
@
11 years ago
- Keywords needs-testing removed
- Owner set to yoavf
- Status changed from new to accepted
Input types such as email and url are not supported on all browsers
However, they default to text, so I think this patch is good to go. It will offer improvement to modern browsers while being backward compatible and future proof.
With 26824.3.diff I updated the patch so that the CSS is in the forms.css file, and also changed the form types of the url and email field in the general settings screen.
#8
follow-up:
↓ 9
@
11 years ago
- Keywords 2nd-opinion added; commit removed
- Type changed from enhancement to defect (bug)
I think there are some reasons why some of these fields are not yet type="url" or type="email". For type="email", there are validation issues: #22183. I imagine type="url" has similar not-yet-seen issues.
#9
in reply to:
↑ 8
@
11 years ago
Replying to nacin:
I think there are some reasons why some of these fields are not yet type="url" or type="email". For type="email", there are validation issues: #22183. I imagine type="url" has similar not-yet-seen issues.
Ok, in this case let's standardise on '.ltr' for the class, and add it to the missing field.
26824.4.diff
#10
@
11 years ago
I see a few issues:
- The new patch removes the code class, which specifies styling in addition to direction. Adding the ltr class here would be redundant.
- The only element the patch changes from RTL to LTR is a single email field. We have a lot of email fields, and it would be good for them to all be consistent.
At this point I realized that the ltr
class is already used in core, but we lost it when we moved to cssjanus. So, I'm restoring it, and adding the ltr class in the one place it is missing.
An Example