0

I have created a form-based web application with jQuery-UI and DataTables v1.9 ... etc. Recently, I added a new feature to allow shift-click to highlight multiple row in DataTables for advanced operations. I know that shift-click will highlight texts, but this time it works unexpected to me, take jQuery-UI demo page as example:

text highlight goes outside dialog

When shift-click upward instead of downward in DataTables, much more texts were highlighted. I have applied JavaScript on tbody of DataTables to hide such behavior from users for now:

$("table#data_table1 > tbody")[0].onselectstart = function() { return false; }

Actually, I just want to prevent the highlight bubbling out of jQuery-UI dialog, how do I modify the JavaScript to stop the bubbling?

It should be allowed

It should also allowed

  • Do you mean you want to prevent text selection while pressing 'shift'? If that is the case, you could refer to [this thread](https://stackoverflow.com/questions/1527751/disable-text-selection-while-pressing-shift). – Zhi Lv Nov 07 '18 at 05:22
  • It is not "disable", the images behind the links shows the current situation. I would provide mock up of actual form in my system once I removed any sensitive information on it. – Incognitoo Nov 07 '18 at 10:07

0 Answers0