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