1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix scrollable tab buttons changing location hash

This commit is contained in:
Nick O'Leary 2016-09-29 23:46:55 +01:00
parent 18c8bbb0fc
commit 7ff9c2885d
2 changed files with 4 additions and 4 deletions

View File

@ -43,9 +43,9 @@ RED.tabs = (function() {
scrollContainer.addClass("red-ui-tabs-scroll-container"); scrollContainer.addClass("red-ui-tabs-scroll-container");
scrollContainer.scroll(updateScroll); scrollContainer.scroll(updateScroll);
scrollLeft = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-left"><a href="#" style="display:none;"><i class="fa fa-caret-left"></i></a></div>').appendTo(wrapper).find("a"); scrollLeft = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-left"><a href="#" style="display:none;"><i class="fa fa-caret-left"></i></a></div>').appendTo(wrapper).find("a");
scrollLeft.on('mousedown',function(evt) { scrollEventHandler(evt,'-=150') }); scrollLeft.on('mousedown',function(evt) { scrollEventHandler(evt,'-=150') }).on('click',function(evt){ evt.preventDefault();});
scrollRight = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-right"><a href="#" style="display:none;"><i class="fa fa-caret-right"></i></a></div>').appendTo(wrapper).find("a"); scrollRight = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-right"><a href="#" style="display:none;"><i class="fa fa-caret-right"></i></a></div>').appendTo(wrapper).find("a");
scrollRight.on('mousedown',function(evt) { scrollEventHandler(evt,'+=150') }); scrollRight.on('mousedown',function(evt) { scrollEventHandler(evt,'+=150') }).on('click',function(evt){ evt.preventDefault();});
} }
function scrollEventHandler(evt,dir) { function scrollEventHandler(evt,dir) {
evt.preventDefault(); evt.preventDefault();

View File

@ -122,7 +122,7 @@
height: 35px; height: 35px;
background: #fff; background: #fff;
border-bottom: 1px solid $primary-border-color; border-bottom: 1px solid $primary-border-color;
z-index: 3; z-index: 2;
a { a {
@include workspace-button; @include workspace-button;
@ -133,7 +133,7 @@
margin-right:3px; margin-right:3px;
margin-left:3px; margin-left:3px;
border: 1px solid $primary-border-color; border: 1px solid $primary-border-color;
z-index: 3; z-index: 2;
} }
} }