From e4f46779d5d88553410f1a7178c385c427784982 Mon Sep 17 00:00:00 2001 From: Yevgeny Khodorkovsky Date: Thu, 12 Sep 2013 13:08:33 -0700 Subject: [PATCH] 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 --- opendaylight/web/root/src/main/resources/js/lib.js | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.36.6