1 Feb 2007 01:45
RE: Re: dialog issues in FF and IE
Joshua Pheneger <joshua.pheneger <at> vegas.com>
2007-02-01 00:45:25 GMT
2007-02-01 00:45:25 GMT
In regards to issue #1:
I have
confirmed that the function placeDialog() in dojo/src/widget/Dialog.js is the
culprit for this scrolling and placement issue.
This
function does not have any code to verify that the boundries of the component
have reached the boundries of the page. It also attempts to center the
component in the center of the page. For larger dialogs, this results in
clipping of the height and width based on the window size.
In regards to issue
#2:
I believe I have verified that this is a layering issue. I
create two modal dialogs in an identical fashion and access them in the
following way:
Page
contains commandLink1 to first modalDialog1.
modalDialog1 contains a commandLink2 to modalDialog2.
modalDialog1 contains a commandLink2 to modalDialog2.
Clicking on commandLink1 will cause modalDialog1 to appear. I am
unable to select any text behind the dialog.
Clicking on commandLink2 (from within modalDialog1) will cause modalDialog2 to appear on top of modalDialog1.
Clicking on commandLink2 (from within modalDialog1) will cause modalDialog2 to appear on top of modalDialog1.
I am
able to select the text within modalDialog1 while modalDialog2 is visible.
At this point, I am unable to type into the text field in modalDialog2
(h:inputText component). I am able to click on the commandButton in
modalDialog1 and close modalDialog1 while modalDialog2 is still open. Once
modalDialog1 is closed modalDialog2's text field is now
editable.
Regards,
Joshua
Pheneger
From: dojo-interest-bounces <at> dojotoolkit.org
[mailto:dojo-interest-bounces <at> dojotoolkit.org] On Behalf Of Joshua
Pheneger
Sent: Wednesday, January 31, 2007 1:09 PM
To: dojo-interest <at> dojotoolkit.org
Subject: [Dojo-interest] Re: dialog issues in FF and IE
Sent: Wednesday, January 31, 2007 1:09 PM
To: dojo-interest <at> dojotoolkit.org
Subject: [Dojo-interest] Re: dialog issues in FF and IE
My company is
evaluating myFaces (and therefore Dojo)
as the UI framework for a large upcoming project and I am having a couple
of issues:
1. When I
display a modalDialog, I am able to scroll the page down endlessly. The
dialog repositions itself, but portions of it are outside of the viewable space
on the page. It seems that the getScrolling javascript function that
gets added to the page upon rendering does not account for reaching the bottom
of the page. This behavior is reproducable
with the Dialog example if you pop-up the dialog and resize the window to a size
that is smaller than the dialog.
The myFaces team has referred both issues to Dojo as
these components are from the dojo toolkit.
<h:outputLink
value="#"
onclick="dojoDialog.show();document.getElementById('higherId').focus();">
<h:outputText value="Scroll View" />
</h:outputLink>
----
<a>Tab View</a>
</div>
onclick="dojoDialog.show();document.getElementById('higherId').focus();">
<h:outputText value="Scroll View" />
</h:outputLink>
----
<a>Tab View</a>
</div>
<b:modalDialog dialogId="DialogContent"
dialogVar="dojoDialog"
dialogAttr="bgColor='white' bgOpacity='0.5' toggle='fade' toggleDuration='250'"
hiderIds="cancel1" styleClass="dojoDialog">
<!-- // Main Content -->
<h:panelGrid columns="1" id="hiderId">
<b:commandButton id="cancel1" forceId="true" value="Cancel"
onclick="dojo.widget.byId('DialogContent').hide();" />
dialogAttr="bgColor='white' bgOpacity='0.5' toggle='fade' toggleDuration='250'"
hiderIds="cancel1" styleClass="dojoDialog">
<!-- // Main Content -->
<h:panelGrid columns="1" id="hiderId">
<b:commandButton id="cancel1" forceId="true" value="Cancel"
onclick="dojo.widget.byId('DialogContent').hide();" />
2. When creating a
dialog that will act as a form, I am unable to enter text into the input
field.
<b:modalDialog dialogId="TripDatesDialogContent"
dialogVar="tripDatesDialog"
dialogAttr="bgColor='white' bgOpacity='0.5' toggle='fade' toggleDuration='250'"
hiderIds="cancel2" styleClass="dojoDialog">
<h:panelGrid>
<input type="text" name="something" value="myvalue" id="newdates" size="25"/>
<b:commandButton id="cancel2" forceId="true" value="Cancel"
onclick="dojo.widget.byId('TripDatesDialogContent').hide();" />
</h:panelGrid>
dialogAttr="bgColor='white' bgOpacity='0.5' toggle='fade' toggleDuration='250'"
hiderIds="cancel2" styleClass="dojoDialog">
<h:panelGrid>
<input type="text" name="something" value="myvalue" id="newdates" size="25"/>
<b:commandButton id="cancel2" forceId="true" value="Cancel"
onclick="dojo.widget.byId('TripDatesDialogContent').hide();" />
</h:panelGrid>
The suggested solution at this point is to adjust
placeDialog() to detect when the end of the page is reached, or when the dialog
is larger than the window. Another option would be to provide an api in
which the user could manipulate the behavior of placeDialog() (such as
scrolling = false).
Any assistance you
can provide will be greatly appreciated and will be taken into account when
evaluating your product.
Regards,
Joshua
Pheneger
_______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook Dojo-interest <at> dojotoolkit.org http://dojotoolkit.org/mailman/listinfo/dojo-interest
RSS Feed