From: Yevgeny Khodorkovsky Date: Thu, 12 Sep 2013 20:08:33 +0000 (-0700) Subject: UI: Reset the scroll-bar to the top of modal X-Git-Tag: releasepom-0.1.0~97 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=e4f46779d5d88553410f1a7178c385c427784982 UI: Reset the scroll-bar to the top of modal - Firefox retains scroll position of a modal window. Want to reset it so the user doesn't have to. Change-Id: I4f80ebbd9938c3e8e957c2bf807d0a44e0362d80 Signed-off-by: Yevgeny Khodorkovsky --- diff --git a/opendaylight/web/root/src/main/resources/js/lib.js b/opendaylight/web/root/src/main/resources/js/lib.js index 64dc09890d..bc922106ec 100644 --- a/opendaylight/web/root/src/main/resources/js/lib.js +++ b/opendaylight/web/root/src/main/resources/js/lib.js @@ -241,6 +241,9 @@ one.lib.modal = { spawn : function(id, header, $body, footer) { var $modal = one.lib.modal.clone(id); one.lib.modal.populate($modal, header, $body, footer); + $modal.on('hide', function () { + $('.modal-body').scrollTop(0); + }); return $modal; }, // empty modal