diff --git a/RoomManager.js b/RoomManager.js index ea6de3c..d380002 100644 --- a/RoomManager.js +++ b/RoomManager.js @@ -856,14 +856,16 @@ $('link-edit-deck').onclick = function (event) { return false; }; -$('room-name').onblur = function (event) { - var roomName = event.target.value; +$('room-name-form').onsubmit = function (event) { + var roomName = $('room-name').value; if (roomName) { socket.emit('renameRoom', { 'roomName': roomName }); } -}; + event.preventDefault(); + return false; +} /* 直播 */ var stopFetchingLive = 0; diff --git a/index.html b/index.html index 258cd42..14dcd7e 100644 --- a/index.html +++ b/index.html @@ -87,7 +87,9 @@ - +
+ +