Opened 8 years ago
Closed 8 years ago
#15975 closed defect (invalid)
Programmatically created DateTextBox is not mirrored
Reported by: | ahmedasaleh | Owned by: | ahmedasaleh |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Dijit - Form | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Using the test_dialog.html file to test the BIDI support for the DateTextBox, it found that The mirrored dijit.form.DateTextBox? is not displayed correctly in RTL direction.
Attachments (2)
Change History (8)
Changed 8 years ago by
Attachment: | datetextbox.JPG added |
---|
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
Component: | General → Dijit - Form |
---|---|
Description: | modified (diff) |
Owner: | set to ahmedasaleh |
Status: | new → pending |
You'll need to attach your actual test case. You claim there's a bug with programmatic creation of DateTextBox in test_Dialog.html, yet that file does not programmatically create a DateTextBox.
Probably your test is invalid because you didn't specify dir as a parameter to the DateTextBox constructor. The dir attribute in the markup is irrelevant for programmatic creation.
comment:3 Changed 8 years ago by
Status: | pending → new |
---|
Herein the modification I made inside the file. Just added dir="rtl" for the widjit with id="dialog1".
<div dir="rtl" id="dialog1" data-dojo-type="dijit/Dialog" data-dojo-props='title:"First Dialog", "aria-describedby":"intro", onFocus:function(){ console.log("user focus handler") }, onBlur:function(){ console.log("user blur handler") }, execute:function(args){ console.log("submitted w/args:\n" + dojo.toJson(args, true)); }'> <div id="intro" style="width:30em;">Introductory information spoken by screen reader if aria-describedby is added to the declaration of dialog above with value equal to the id of the container element for this text. This technique will work in Dojo 1.4. </div> <table style="position:relative;"> <tr> <td><label for="name">Name: </label></td> <td><input id="name" data-dojo-type="dijit/form/TextBox" data-dojo-props='type:"text", name:"name" '/></td> </tr> <tr> <td><label for="loc">Location: </label></td> <td><input id="loc" data-dojo-type="dijit/form/TextBox" data-dojo-props='type:"text", name:"loc" '/></td> </tr> <tr> <td><label for="date">Date: </label></td> <td><input id="date" data-dojo-type="dijit/form/DateTextBox" data-dojo-props='type:"text", name:"date" '/></td> </tr> <tr> <td><label>Time: </label></td> <td><div id="time" data-dojo-type="dijit/InlineEditBox" data-dojo-props='editor:"dijit.form.TimeTextBox", editorParams:{type:"text", name:"time"}, width:"100px", style:"width:100px;"'></div></td> </tr> <tr> <td><label for="desc">Description: </label></td> <td><input id="desc" data-dojo-type="dijit/form/TextBox" data-dojo-props='type:"text", name:"desc" '/></td> </tr> <tr> <td colspan="2" style="text-align:center;"> <button id="ok" data-dojo-type="dijit/form/Button" data-dojo-props='type:"submit"'>OK</button></td> </tr> </table> </div>
comment:4 Changed 8 years ago by
Specifying dir on widjit level should be propagated to the grammatically created widjit. I understand that the current code of the widjit doesn't support that but I think the following code could fix it:
buildRendering : function() { this.inherited(arguments); var myDijit = dijit.byId(this); var node = dojo.byId(myDijit.id); if(node){ if (node.dir == "rtl") { myDijit.set("dir", "rtl"); } } }
comment:5 Changed 8 years ago by
Status: | new → pending |
---|
Where is this programmatically created DateTextBox you keep talking about?
Anyway, as I wrote in your other ticket, programmatically created widgets don't read their parameters from HTML markup, and this is intended behavior.
comment:6 Changed 8 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
This problem appears when you apply the dir="rtl" on widget level.