startScroll is undefined #16793
Labels
Bug
A problem or regression with an existing feature
waiting on upstream
Issues blocked by a third-party
Projects
Milestone
Describe the bug
If you go to SQL and enter a query on multiple lines, that makes a scroll on the right side and also if the last char of the query is a letter that makes a dropdown so you can select the value, will result in a JavaScript error
can't access property "top", startScroll is undefined.To Reproduce
Steps to reproduce the behavior:
And the same error on Browse tab
and
Expected behavior
The JavaScript error shouldn't be there.
Screenshots
Client configuration
Additional context
{ "pma_version": "5.2.0-dev", "browser_name": "FIREFOX", "browser_version": "88.0", "user_os": "Win", "server_software": "nginx/1.14.2", "user_agent_string": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0", "locale": "en", "configuration_storage": "disabled", "php_version": "7.4.14", "script_name": "index.php", "exception_type": "js", "exception": { "mode": "stack", "name": "TypeError", "message": "can't access property \"top\", startScroll is undefined", "stack": [ { "func": "Widget/this.onScroll", "line": "324", "column": "20", "context": [ " cm.on(\"focus\", this.onFocus = function() { clearTimeout(closingOnBlur//...", " }", "", " cm.on(\"scroll\", this.onScroll = function() {", " var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().g//...", " var newTop = top + startScroll.top - curScroll.top;", " var point = newTop - (parentWindow.pageYOffset || (ownerDocument.docu//...", " if (!below) point += hints.offsetHeight;", " if (point <= editor.top || point >= editor.bottom) return completion.//...", " hints.style.top = newTop + \"px\";", " hints.style.left = (left + startScroll.left - curScroll.left) + \"px\";" ], "uri": "js/vendor/codemirror/addon/hint/show-hint.js?v=5.2.0-dev", "scriptname": "js/vendor/codemirror/addon/hint/show-hint.js" }, { "func": "signal", "line": "568", "column": "61", "context": [ "", " function signal(emitter, type /*, values...*/) {", " var handlers = getHandlers(emitter, type);", " if (!handlers.length) { return }", " var args = Array.prototype.slice.call(arguments, 2);", " for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }", " }", "", " // The DOM events that CodeMirror handles can be overridden by", " // registering a (non-DOM) handler on the editor for the event name,", " // and preventDefault-ing the event in that handler." ], "uri": "js/vendor/codemirror/lib/codemirror.js?v=5.2.0-dev", "scriptname": "js/vendor/codemirror/lib/codemirror.js" }, { "func": "registerEventHandlers/<", "line": "7999", "column": "15", "context": [ " // area, ensure viewport is updated when scrolling.", " on(d.scroller, \"scroll\", function () {", " if (d.scroller.clientHeight) {", " updateScrollTop(cm, d.scroller.scrollTop);", " setScrollLeft(cm, d.scroller.scrollLeft, true);", " signal(cm, \"scroll\", cm);", " }", " });", "", " // Listen to wheel events in order to try and update the viewport on time.", " on(d.scroller, \"mousewheel\", function (e) { return onScrollWheel(cm, e); });" ], "uri": "js/vendor/codemirror/lib/codemirror.js?v=5.2.0-dev", "scriptname": "js/vendor/codemirror/lib/codemirror.js" } ], "uri": "index.php?route=%2Fserver%2Fsql&lang=en" } }The text was updated successfully, but these errors were encountered: