NagVis / nagvis

Visualization addon for your open source monitoring core
http://nagvis.org/
GNU General Public License v2.0
115 stars 73 forks source link

JavaScript resize functions fire when they shouldn't #339

Open miken32 opened 1 year ago

miken32 commented 1 year ago

In edit.js the functions resizeMouseUp() and resizeMouseDown() are firing in response to context menu right clicks. The fix is simple, for both functions. Add near the top of the functions:

if (event.button > 0)
  return true;

In particular, resizeMouseUp() triggers a save of the map on the server side, but is doing no checking on the values. This was causing problems for us, with NaN getting written into the width and height properties of textboxes, breaking the entire map.

miken32 commented 5 months ago

This continues to be a problem for us; it seems weird to spend time fixing bugs in a version of PHP that's been unsupported for almost a decade instead of looking at QOL fixes like this.