mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
Ctrl+click in select moves the cursor in modern browsers
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
## Adminer dev
|
||||
- Confirm before exiting edited edit form
|
||||
- Display collation at table structure if different from table
|
||||
- Ctrl+click in select moves the cursor in modern browsers
|
||||
- PostgreSQL: Display auto_increment of inserted rows
|
||||
- PostgreSQL: Display description of system variables
|
||||
- PostgreSQL: Avoid warning about crdb_version (bug #924, regression from 5.0.5)
|
||||
|
@@ -715,7 +715,7 @@ function selectClick(event, text, warning) {
|
||||
}
|
||||
};
|
||||
|
||||
let pos = event.rangeOffset;
|
||||
const pos = getSelection().anchorOffset;
|
||||
let value = (td.firstChild && td.firstChild.alt) || td.textContent || td.innerText;
|
||||
const tdStyle = window.getComputedStyle(td, null);
|
||||
|
||||
@@ -731,14 +731,6 @@ function selectClick(event, text, warning) {
|
||||
if (qsa('i', td).length) { // <i> - NULL
|
||||
value = '';
|
||||
}
|
||||
if (document.selection) {
|
||||
const range = document.selection.createRange();
|
||||
range.moveToPoint(event.clientX, event.clientY);
|
||||
const range2 = range.duplicate();
|
||||
range2.moveToElementText(td);
|
||||
range2.setEndPoint('EndToEnd', range);
|
||||
pos = range2.text.length;
|
||||
}
|
||||
td.innerHTML = '';
|
||||
td.appendChild(input);
|
||||
setupSubmitHighlight(td);
|
||||
@@ -755,11 +747,6 @@ function selectClick(event, text, warning) {
|
||||
input.name = td.id;
|
||||
input.selectionStart = pos;
|
||||
input.selectionEnd = pos;
|
||||
if (document.selection) {
|
||||
const range = document.selection.createRange();
|
||||
range.moveEnd('character', -input.value.length + pos);
|
||||
range.select();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user