Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing dialogs to be inside a container #1513

Merged
merged 3 commits into from
Jul 30, 2015

Conversation

divdavem
Copy link
Member

This PR adds a new container property for the @aria:Dialog widget.
If this property is defined, the dialog is inserted as a child of the corresponding DOM element (which must have the position:relative or position: absolute style), and the dialog can only be moved or resized inside this element. If the dialog is modal, the modal mask is only above the container, and focusing elements outside the container is still possible.
This PR also contains a commit which fixes issues in the Resize/Drag utilities.

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 28, 2015
…utilities

This commit fixes the following issues:
- when dragging an element inside a container, the borders of the container
were not properly taken into account to limit the area in which the element
can be dragged
- when resizing an element outside its boundaries, the size could increase
at the opposite side of the mouse instead of being properly limited,
because the aria.utils.Dom.fitInside method was called (which only changes
the position, and keeps the size) whereas it is needed to limit the size
when the boundaries are reached.
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 28, 2015
MovableDialogTestCase was part of ContainerTestSuite instead of being
part of the MovableDialogTestSuite.
…utilities

This commit fixes the following issues:
- when dragging an element inside a container, the borders of the container
were not properly taken into account to limit the area in which the element
can be dragged
- when resizing an element outside its boundaries, the size could increase
at the opposite side of the mouse instead of being properly limited,
because the aria.utils.Dom.fitInside method was called (which only changes
the position, and keeps the size) whereas it is needed to limit the size
when the boundaries are reached.
MovableDialogTestCase was part of ContainerTestSuite instead of being
part of the MovableDialogTestSuite.
This commit adds a new `container` property for the `@aria:Dialog` widget.
If this property is defined, the dialog is inserted as a child of the
corresponding DOM element (which must have the `position:relative` or
`position: absolute` style), and the dialog can only be moved or resized
inside this element. If the dialog is modal, the modal mask is only above
the container, and focusing elements outside the container is still
possible.

close ariatemplates#1513
@benouat
Copy link
Member

benouat commented Jul 30, 2015

@divdavem this PR is fine for me. Don't squash the commits to push to master. Leave it like that.

@divdavem divdavem merged commit ef6ceed into ariatemplates:master Jul 30, 2015
@divdavem
Copy link
Member Author

@benouat Thank you for your review!

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 30, 2015
…utilities

This commit fixes the following issues:
- when dragging an element inside a container, the borders of the container
were not properly taken into account to limit the area in which the element
can be dragged
- when resizing an element outside its boundaries, the size could increase
at the opposite side of the mouse instead of being properly limited,
because the aria.utils.Dom.fitInside method was called (which only changes
the position, and keeps the size) whereas it is needed to limit the size
when the boundaries are reached.

(cherry picked from commit 97fce1a)

Conflicts:
	src/aria/utils/dragdrop/Drag.js
	src/aria/utils/resize/Resize.js
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 30, 2015
MovableDialogTestCase was part of ContainerTestSuite instead of being
part of the MovableDialogTestSuite.

(cherry picked from commit 36dfd72)
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 30, 2015
This commit adds a new `container` property for the `@aria:Dialog` widget.
If this property is defined, the dialog is inserted as a child of the
corresponding DOM element (which must have the `position:relative` or
`position: absolute` style), and the dialog can only be moved or resized
inside this element. If the dialog is modal, the modal mask is only above
the container, and focusing elements outside the container is still
possible.

close ariatemplates#1513

(cherry picked from commit ef6ceed)

Conflicts:
	src/aria/popups/Popup.js
	src/aria/popups/PopupManager.js
	src/aria/utils/resize/Resize.js
	src/aria/widgets/container/Dialog.js
	test/aria/widgets/container/dialog/DialogTestSuite.js
	test/attester-nophantom.yml
	test/attester-packaged.yml
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 30, 2015
This commit adds a new `container` property for the `@aria:Dialog` widget.
If this property is defined, the dialog is inserted as a child of the
corresponding DOM element (which must have the `position:relative` or
`position: absolute` style), and the dialog can only be moved or resized
inside this element. If the dialog is modal, the modal mask is only above
the container, and focusing elements outside the container is still
possible.

close ariatemplates#1513

(cherry picked from commit ef6ceed)

Conflicts:
	src/aria/popups/Popup.js
	src/aria/popups/PopupManager.js
	src/aria/utils/resize/Resize.js
	src/aria/widgets/container/Dialog.js
	test/aria/widgets/container/dialog/DialogTestSuite.js
	test/attester-nophantom.yml
	test/attester-packaged.yml
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 30, 2015
…utilities

This commit fixes the following issues:
- when dragging an element inside a container, the borders of the container
were not properly taken into account to limit the area in which the element
can be dragged
- when resizing an element outside its boundaries, the size could increase
at the opposite side of the mouse instead of being properly limited,
because the aria.utils.Dom.fitInside method was called (which only changes
the position, and keeps the size) whereas it is needed to limit the size
when the boundaries are reached.

(cherry picked from commit 97fce1a)

Conflicts:
	src/aria/utils/dragdrop/Drag.js
	src/aria/utils/resize/Resize.js
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 30, 2015
MovableDialogTestCase was part of ContainerTestSuite instead of being
part of the MovableDialogTestSuite.

(cherry picked from commit 36dfd72)
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 30, 2015
This commit adds a new `container` property for the `@aria:Dialog` widget.
If this property is defined, the dialog is inserted as a child of the
corresponding DOM element (which must have the `position:relative` or
`position: absolute` style), and the dialog can only be moved or resized
inside this element. If the dialog is modal, the modal mask is only above
the container, and focusing elements outside the container is still
possible.

close ariatemplates#1513

(cherry picked from commit ef6ceed)

Conflicts:
	src/aria/popups/Popup.js
	src/aria/popups/PopupManager.js
	src/aria/utils/resize/Resize.js
	src/aria/widgets/container/Dialog.js
	test/aria/widgets/container/dialog/DialogTestSuite.js
	test/attester-nophantom.yml
	test/attester-packaged.yml
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 31, 2015
…utilities

This commit fixes the following issues:
- when dragging an element inside a container, the borders of the container
were not properly taken into account to limit the area in which the element
can be dragged
- when resizing an element outside its boundaries, the size could increase
at the opposite side of the mouse instead of being properly limited,
because the aria.utils.Dom.fitInside method was called (which only changes
the position, and keeps the size) whereas it is needed to limit the size
when the boundaries are reached.

(cherry picked from commit 97fce1a)

Conflicts:
	src/aria/utils/dragdrop/Drag.js
	src/aria/utils/resize/Resize.js
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 31, 2015
MovableDialogTestCase was part of ContainerTestSuite instead of being
part of the MovableDialogTestSuite.

(cherry picked from commit 36dfd72)
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 31, 2015
This commit adds a new `container` property for the `@aria:Dialog` widget.
If this property is defined, the dialog is inserted as a child of the
corresponding DOM element (which must have the `position:relative` or
`position: absolute` style), and the dialog can only be moved or resized
inside this element. If the dialog is modal, the modal mask is only above
the container, and focusing elements outside the container is still
possible.

close ariatemplates#1513

(cherry picked from commit ef6ceed)

Conflicts:
	src/aria/popups/Popup.js
	src/aria/popups/PopupManager.js
	src/aria/utils/resize/Resize.js
	src/aria/widgets/container/Dialog.js
	test/aria/widgets/container/dialog/DialogTestSuite.js
	test/attester-nophantom.yml
	test/attester-packaged.yml
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 31, 2015
…utilities

This commit fixes the following issues:
- when dragging an element inside a container, the borders of the container
were not properly taken into account to limit the area in which the element
can be dragged
- when resizing an element outside its boundaries, the size could increase
at the opposite side of the mouse instead of being properly limited,
because the aria.utils.Dom.fitInside method was called (which only changes
the position, and keeps the size) whereas it is needed to limit the size
when the boundaries are reached.

(cherry picked from commit 97fce1a)

Conflicts:
	src/aria/utils/dragdrop/Drag.js
	src/aria/utils/resize/Resize.js
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 31, 2015
MovableDialogTestCase was part of ContainerTestSuite instead of being
part of the MovableDialogTestSuite.

(cherry picked from commit 36dfd72)
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Jul 31, 2015
This commit adds a new `container` property for the `@aria:Dialog` widget.
If this property is defined, the dialog is inserted as a child of the
corresponding DOM element (which must have the `position:relative` or
`position: absolute` style), and the dialog can only be moved or resized
inside this element. If the dialog is modal, the modal mask is only above
the container, and focusing elements outside the container is still
possible.

close ariatemplates#1513

(cherry picked from commit ef6ceed)

Conflicts:
	src/aria/popups/Popup.js
	src/aria/popups/PopupManager.js
	src/aria/utils/resize/Resize.js
	src/aria/widgets/container/Dialog.js
	test/aria/widgets/container/dialog/DialogTestSuite.js
	test/attester-nophantom.yml
	test/attester-packaged.yml
@divdavem divdavem added this to the 1.7.11 milestone Sep 2, 2015
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Sep 2, 2015
…utilities

This commit fixes the following issues:
- when dragging an element inside a container, the borders of the container
were not properly taken into account to limit the area in which the element
can be dragged
- when resizing an element outside its boundaries, the size could increase
at the opposite side of the mouse instead of being properly limited,
because the aria.utils.Dom.fitInside method was called (which only changes
the position, and keeps the size) whereas it is needed to limit the size
when the boundaries are reached.

(cherry picked from commit 97fce1a)

Conflicts:
	src/aria/utils/dragdrop/Drag.js
	src/aria/utils/resize/Resize.js
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Sep 2, 2015
MovableDialogTestCase was part of ContainerTestSuite instead of being
part of the MovableDialogTestSuite.

(cherry picked from commit 36dfd72)
divdavem added a commit to divdavem/ariatemplates that referenced this pull request Sep 2, 2015
This commit adds a new `container` property for the `@aria:Dialog` widget.
If this property is defined, the dialog is inserted as a child of the
corresponding DOM element (which must have the `position:relative` or
`position: absolute` style), and the dialog can only be moved or resized
inside this element. If the dialog is modal, the modal mask is only above
the container, and focusing elements outside the container is still
possible.

close ariatemplates#1513

(cherry picked from commit ef6ceed)

Conflicts:
	src/aria/popups/Popup.js
	src/aria/popups/PopupManager.js
	src/aria/utils/resize/Resize.js
	src/aria/widgets/container/Dialog.js
	test/aria/widgets/container/dialog/DialogTestSuite.js
	test/attester-nophantom.yml
	test/attester-packaged.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants